From 4ad246e36225c7d4401842cf915807ff540dae1a Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Thu, 19 Jun 2014 02:15:17 +0200 Subject: [PATCH 01/52] Initial commit. --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1caa902 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/target +/classes +/checkouts +pom.xml +pom.xml.asc +*.jar +*.class +/.lein-* +/.nrepl-port +doc/index.html From 4f10c5742c2ad7df44ddebcf41adf69663c814e8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Thu, 19 Jun 2014 02:16:41 +0200 Subject: [PATCH 02/52] Update doc --- index.html | 429 +++++++++++++++++++++++++++++++ static/asciidoc.css | 529 ++++++++++++++++++++++++++++++++++++++ static/asciidoc.js | 189 ++++++++++++++ static/niwi.css | 607 ++++++++++++++++++++++++++++++++++++++++++++ static/pygments.css | 205 +++++++++++++++ 5 files changed, 1959 insertions(+) create mode 100644 index.html create mode 100644 static/asciidoc.css create mode 100644 static/asciidoc.js create mode 100644 static/niwi.css create mode 100644 static/pygments.css diff --git a/index.html b/index.html new file mode 100644 index 0000000..67a5e36 --- /dev/null +++ b/index.html @@ -0,0 +1,429 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="generator" content="AsciiDoc 8.6.9"> +<title>Category Theory abstractions for Clojure</title> +<link rel="stylesheet" href="static/niwi.css" type="text/css"> +<link rel="stylesheet" href="static/pygments.css" type="text/css"> + + +<script type="text/javascript" src="static/asciidoc.js"></script> +<script type="text/javascript" src="static/niwi.js"></script> +<script type="text/javascript"> +/*<![CDATA[*/ +asciidoc.install(2); +/*]]>*/ +</script> +</head> +<body class="article" style="max-width:960px"> +<div id="header"> +<h1>Category Theory abstractions for Clojure</h1> +<span id="author">Andrey Antukh & Alejandro Gómez</span><br> +<span id="revnumber">version 0.1.0,</span> +<span id="revdate">2014-06-06</span> +<div id="toc"> + <div id="toctitle">Table of Contents</div> + <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript> +</div> +</div> +<div id="content"> +<div class="sect1"> +<h2 id="_introduction">Introduction</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Category Theory abstractions for Clojure.</p></div> +<div class="sect2"> +<h3 id="_philosophy">Philosophy</h3> +<div class="paragraph"><p>Four most important rules:</p></div> +<div class="ulist"><ul> +<li> +<p> +Beautiful is better than ugly +</p> +</li> +<li> +<p> +Explicit is better than implicit +</p> +</li> +<li> +<p> +Simple is better than complex +</p> +</li> +<li> +<p> +Readability counts +</p> +</li> +</ul></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_project_maturity">Project Maturity</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Since <em>cats</em> is a young project there can be some API breakage.</p></div> +</div> +</div> +<div class="sect1"> +<h2 id="_install">Install</h2> +<div class="sectionbody"> +<div class="paragraph"><p>This section covers installing <em>cats</em>.</p></div> +<div class="sect2"> +<h3 id="_requirements">Requirements</h3> +<div class="paragraph"><p><em>cats</em> has support for these jvm versions:</p></div> +<div class="ulist"><ul> +<li> +<p> +JDK7 +</p> +</li> +<li> +<p> +JDK8 +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_leiningen">Leiningen</h3> +<div class="paragraph"><p>The simplest way to use <em>cats</em> in a Clojure project is by including +it as a dependency in your <strong><em>project.clj</em></strong>:</p></div> +<div class="listingblock"> +<div class="title"><em>in project.clj</em></div> +<div class="content"><div class="highlight"><pre><span class="p">[</span><span class="nv">cats</span> <span class="s">"0.1.0-SNAPSHOT"</span><span class="p">]</span> +</pre></div></div></div> +</div> +<div class="sect2"> +<h3 id="_maven">Maven</h3> +<div class="paragraph"><p>Also, you can use it with maven. First, add the clojars repository:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="nt"><repository></span> + <span class="nt"><id></span>clojars.org<span class="nt"></id></span> + <span class="nt"><url></span>http://clojars.org/repo<span class="nt"></url></span> +<span class="nt"></repository></span> +</pre></div></div></div> +<div class="paragraph"><p>Then for cats:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="nt"><dependency></span> + <span class="nt"><groupId></span>cats<span class="nt"></groupId></span> + <span class="nt"><artifactId></span>cats<span class="nt"></artifactId></span> + <span class="nt"><version></span>0.1.0-SNAPSHOT<span class="nt"></version></span> +<span class="nt"></dependency></span> +</pre></div></div></div> +</div> +<div class="sect2"> +<h3 id="_get_the_code">Get the Code</h3> +<div class="paragraph"><p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p></div> +<div class="paragraph"><p>You can clone the public repository with this command:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre>git clone https://github.com/niwibe/cats +</pre></div></div></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_abstractions_reference">Abstractions Reference</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_functor">Functor</h3> +<div class="paragraph"><p>The Functor represents some sort of "computational context".</p></div> +<div class="listingblock"> +<div class="title">This is aspect of Functor protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Functor</span> + <span class="p">(</span><span class="nf">fmap</span> <span class="p">[</span><span class="nv">fv</span> <span class="nv">f</span><span class="p">]</span> + <span class="s">"Applies function f to the value(s) inside</span> +<span class="s"> the context of the functor fv."</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p><span class="monospaced">fmap</span> takes one wrapped value in functor context fv (ex: <span class="monospaced">Just 2</span>) and plain function, +unwraps the value and apply a function to plain value returning it wrapped in a new context +of <strong>the same type</strong> of the first argument.</p></div> +<div class="paragraph"><p>Some examples can explain it better:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> + +<span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> +<span class="c1">;; => #<Just [2]></span> +</pre></div></div></div> +<div class="paragraph"><p>Same example but applying function over Nothing:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +<div class="paragraph"><p>The real fmap signature is <span class="monospaced">(a -> b) -> f a -> f b</span> that can be traslated to clojure <span class="monospaced">[f fv]</span>.</p></div> +<div class="paragraph"><p>The changed order on protocol parameters definition is required because of clojure’s protocols +limitation that only allow dispatching on first argument.</p></div> +<div class="paragraph"><p>You should never use protocol function directly. For it, <span class="monospaced">cats.core/fmap</span> exists, and it has +the correct signature.</p></div> +<div class="paragraph"><p>All examples of this documentation uses <span class="monospaced">cats.core/fmap</span> instead of function defined in the +protocol.</p></div> +</td> +</tr></table> +</div> +<div class="paragraph"><p>Some of native clojure types, like Vector, also implements the Functor protocol and can +work like functor context/container:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;; => [2 3 4]</span> +</pre></div></div></div> +<div class="paragraph"><p>The main difference of previous example with default clojure map, is that the clojure +map works with seqs and it not respects the input container:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nb">map inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;; => (2 3 4)</span> +</pre></div></div></div> +<div class="paragraph"><p>You can see more information and examples of clojure types that implements this protocol +on the last section of this documentation.</p></div> +</div> +<div class="sect2"> +<h3 id="_applicative_functor">Applicative Functor</h3> +<div class="paragraph"><p>Represents an abstraction lying in between Functor and Monad in expressivity.</p></div> +<div class="listingblock"> +<div class="title">Applicative protocol definition</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Applicative</span> + <span class="p">(</span><span class="nf">fapply</span> <span class="p">[</span><span class="nv">af</span> <span class="nv">av</span><span class="p">]</span> + <span class="s">"Applies the function(s) inside ag's context to the value(s)</span> +<span class="s"> inside av's context while preserving the context."</span><span class="p">)</span> + <span class="p">(</span><span class="nf">pure</span> <span class="p">[</span><span class="nv">ctx</span> <span class="nv">v</span><span class="p">]</span> + <span class="s">"Takes any context monadic value ctx and any value v, and puts</span> +<span class="s"> the value v in the most minimal context of same type of ctx"</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p>With the same idea of data inside a context (like <span class="monospaced">Functor</span>), what is happens if a wrapped value is +one function/computation? Applicative functors works like plain functors but additionally +can apply function wrapped in some context similar to input value.</p></div> +<div class="paragraph"><p>Let see one example:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defn </span><span class="nv">make-greeter</span> + <span class="p">[</span><span class="o">^</span><span class="nv">String</span> <span class="nv">lang</span><span class="p">]</span> + <span class="p">(</span><span class="nf">condp</span> <span class="nb">= </span><span class="nv">lang</span> + <span class="s">"es"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hola "</span> <span class="nv">name</span><span class="p">)))</span> + <span class="s">"en"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hello "</span> <span class="nv">name</span><span class="p">)))</span> + <span class="p">(</span><span class="nf">nothing</span><span class="p">)))</span> + +<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"es"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> +<span class="c1">;; => #<Just [Hola Alex]></span> + +<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"en"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> +<span class="c1">;; => #<Just [Hello Alex]></span> + +<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"it"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +<div class="paragraph"><p>Moreover, applicative functor protocol comes with an other function: <span class="monospaced">pure</span>. The main purpose of +it, is given any value in a context and new value, wraps the new value in a minimal context of same +type as first argument.</p></div> +<div class="paragraph"><p>To understand it better, see some examples:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="mi">5</span><span class="p">)</span> +<span class="c1">;; => #<Just [5]></span> + +<span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nb">right </span><span class="ss">:foo</span><span class="p">)</span> <span class="ss">:bar</span><span class="p">)</span> +<span class="c1">;; => #<Either [:bar :right]></span> +</pre></div></div></div> +<div class="paragraph"><p>The real purpose of this function you will see in a following <span class="monospaced">Monad</span> section.</p></div> +</div> +<div class="sect2"> +<h3 id="_monad">Monad</h3> +<div class="paragraph"><p>Monads are the most discussed programming concept to come from category theory. Like functors and +applicatives, monads deal with data in contexts.</p></div> +<div class="paragraph"><p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and +put new value in a completely different context.</p></div> +<div class="listingblock"> +<div class="title">This is aspect of Monad protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Monad</span> + <span class="s">"Incomplete monad type definition."</span> + <span class="p">(</span><span class="nf">bind</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">f</span><span class="p">]</span> <span class="s">"Applies the function f to the value(s) inside mv's context."</span><span class="p">))</span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">In diference with haskel type class, <em>cats</em> protocol only defines one method: <span class="monospaced">bind</span>. Other +related methods like <span class="monospaced">return</span> are defined as auxiliar functions in <span class="monospaced">cats.core</span> namespace.</td> +</tr></table> +</div> +<div class="paragraph"><p><span class="monospaced">bind</span> function, takes a monadic value (any container that implements a <span class="monospaced">Monad</span> protocol) and one +function, applies the function with unwrapped value as first parameter and return a result. In this +case, is a function respoisability of function wrap the result in a corresponding context.</p></div> +<div class="paragraph"><p>One of the key features of bind function, that everythig insined a monad context known the context +type. Having this, if you apply some computation over a monad and you want return the result +in the same container context but you don’t know that contaier is it, you can use <span class="monospaced">return</span> or <span class="monospaced">pure</span> +function for it.</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">bind</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">v</span><span class="p">]</span> <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">inc </span><span class="nv">v</span><span class="p">))))</span> +<span class="c1">;; => #<Just [2]></span> +</pre></div></div></div> +<div class="paragraph"><p><span class="monospaced">return</span> or <span class="monospaced">pure</span> function with one argument, try takes a context value from dynamic scope collected +internaly by <span class="monospaced">bind</span> function, so that, you can not use them with one argument out of <span class="monospaced">bind</span> context.</p></div> +<div class="paragraph"><p>And finally, for make more powerful monadic compositions, <em>cats</em> comes with <span class="monospaced">mlet</span> macro that +if you coming from haskell, represents a <span class="monospaced">do-syntax</span>:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> + <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> + <span class="nv">z</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">))]</span> + <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> +<span class="c1">;; => #<Just [3]></span> +</pre></div></div></div> +<div class="paragraph"><p>TODO: document other more advanced options like <span class="monospaced">:let</span> and <span class="monospaced">:when</span> in a <span class="monospaced">mlet</span> context.</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_data_types_reference">Data Types Reference</h2> +<div class="sectionbody"> +<div class="paragraph"><p>We talked about values in a context, but that is a context? Context per se is any value that +wraps an other value inside.</p></div> +<div class="sect2"> +<h3 id="_maybe">Maybe</h3> +<div class="paragraph"><p>Two most common wrapper is "Maybe" (commonly named Optional on not functional programming +languages).</p></div> +<div class="paragraph"><p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is +used as the return type of functions which may or may not return a meaningful value when they +are applied. It consists of either an empty constructor (called None or Nothing), or a constructor +encapsulating the original data type A (written Just A or Some A).</p></div> +<div class="paragraph"><p><em>cats</em>, implements two constructors:</p></div> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">(just v)</span>: represents just a value in a context. +</p> +</li> +<li> +<p> +<span class="monospaced">(nothing)</span>: represents a failure or null. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> +<span class="c1">;; => #<Just [1]></span> +<span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">Maybe types are: Functors, Applicative Functors and Monads</td> +</tr></table> +</div> +</div> +<div class="sect2"> +<h3 id="_either">Either</h3> +<div class="paragraph"><p>Either is an other type that represents a result of computation, but in contrast with maybe +it can return something with failed computation result.</p></div> +<div class="paragraph"><p>In <em>cats</em> library it has two constructors:</p></div> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">(left v)</span>: represents a failure. +</p> +</li> +<li> +<p> +<span class="monospaced">(right v)</span>: represents a successful result. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> + +<span class="p">(</span><span class="nb">right </span><span class="ss">:valid-value</span><span class="p">)</span> +<span class="c1">;; => #<Right [:valid-value :right]></span> + +<span class="p">(</span><span class="nb">left </span><span class="s">"Error message"</span><span class="p">)</span> +<span class="c1">;; => #<Either [Error message :left]></span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">Either is also (like Maybe) Functor, Applicative Functor and Monad.</td> +</tr></table> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_clojure_types">Clojure Types</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Besides the own types, some colojure types has implementations for previously explained +category theory abstractions.</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">With contrast with other similar libraries in clojure, <em>cats</em> not intends extend clojure types +that not acts like containers. As example, clojure keywords are values but can not be containers, so +that, their should not extend previously explained protocols.</td> +</tr></table> +</div> +<div class="sect2"> +<h3 id="_vector">Vector</h3> +<div class="paragraph"><p>TODO</p></div> +</div> +<div class="sect2"> +<h3 id="_list">List</h3> +<div class="paragraph"><p>TODO</p></div> +</div> +<div class="sect2"> +<h3 id="_set">Set</h3> +<div class="paragraph"><p>TODO</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_license">License</h2> +<div class="sectionbody"> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre>Copyright (c) 2014, Andrey Antukh +Copyright (c) 2014, Alejandro Gómez + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +</pre></div></div></div> +</div> +</div> +</div> +<div id="footnotes"><hr></div> +<div id="footer"> +<div id="footer-text"> +Version 0.1.0<br> +Last updated 2014-06-19 02:15:27 CEST +</div> +</div> +</body> +</html> diff --git a/static/asciidoc.css b/static/asciidoc.css new file mode 100644 index 0000000..4d64af2 --- /dev/null +++ b/static/asciidoc.css @@ -0,0 +1,529 @@ +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ + +/* Default font. */ +body { + font-family: Georgia,serif; + font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, Sans-Serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Arial,Helvetica,sans-serif; + font-family: Georgia, 'Times New Roman', Times, Serif; +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} +h5 { + font-size: 1.0em; +} + +div.sectionbody { + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} +ul > li { color: #aaa; } +ul > li > * { color: black; } + +.monospaced, code, pre { + font-family: "Courier New", Courier, monospace; + font-size: inherit; + color: navy; + padding: 0; + margin: 0; +} +pre { + white-space: pre-wrap; +} + +#author { + color: #527bbd; + font-weight: bold; + font-size: 1.1em; +} +#email { +} +#revnumber, #revdate, #revremark { +} + +#footer { + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +#footer-text { + float: left; + padding-bottom: 0.5em; +} +#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.0em; + margin-bottom: 2.0em; + margin-right: 10%; + color: #606060; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid #dddddd; + border-left: 4px solid #f0f0f0; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid #dddddd; + border-left: 5px solid #f0f0f0; + background: #f8f8f8; + padding: 0.5em; +} + +div.quoteblock, div.verseblock { + padding-left: 1.0em; + margin-left: 1.0em; + margin-right: 10%; + border-left: 5px solid #f0f0f0; + color: #888; +} + +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock > pre.content { + font-family: inherit; + font-size: inherit; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 3px solid #dddddd; +} + +div.exampleblock > div.content { + border-left: 3px solid #dddddd; + padding-left: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; vertical-align: text-bottom; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +.footnote, .footnoteref { + font-size: 0.8em; +} + +span.footnote, span.footnoteref { + vertical-align: super; +} + +#footnotes { + margin: 20px 0 20px 0; + padding: 7px 0 0 0; +} + +#footnotes div.footnote { + margin: 0 0 5px 0; +} + +#footnotes hr { + border: none; + border-top: 1px solid silver; + height: 1px; + text-align: left; + margin-left: 0; + width: 20%; + min-width: 100px; +} + +div.colist td { + padding-right: 0.5em; + padding-bottom: 0.3em; + vertical-align: top; +} +div.colist td img { + margin-top: 0.3em; +} + +@media print { + #footer-badges { display: none; } +} + +#toc { + margin-bottom: 2.5em; +} + +#toctitle { + color: #527bbd; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + +div.unbreakable { page-break-inside: avoid; } + + +/* + * xhtml11 specific + * + * */ + +div.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.tableblock > table { + border: 3px solid #527bbd; +} +thead, p.table.header { + font-weight: bold; + color: #527bbd; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +/* + * html5 specific + * + * */ + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #527bbd; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #527bbd; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #527bbd; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + +/* + * manpage specific + * + * */ + +body.manpage h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +body.manpage h2 { + border-style: none; +} +body.manpage div.sectionbody { + margin-left: 3em; +} + +@media print { + body.manpage div#toc { display: none; } +} diff --git a/static/asciidoc.js b/static/asciidoc.js new file mode 100644 index 0000000..ac36563 --- /dev/null +++ b/static/asciidoc.js @@ -0,0 +1,189 @@ +var asciidoc = { // Namespace. + +///////////////////////////////////////////////////////////////////// +// Table Of Contents generator +///////////////////////////////////////////////////////////////////// + +/* Author: Mihai Bazon, September 2002 + * http://students.infoiasi.ro/~mishoo + * + * Table Of Content generator + * Version: 0.4 + * + * Feel free to use this script under the terms of the GNU General Public + * License, as long as you do not remove or alter this notice. + */ + + /* modified by Troy D. Hanson, September 2006. License: GPL */ + /* modified by Stuart Rackham, 2006, 2009. License: GPL */ + +// toclevels = 1..4. +toc: function (toclevels) { + + function getText(el) { + var text = ""; + for (var i = el.firstChild; i != null; i = i.nextSibling) { + if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. + text += i.data; + else if (i.firstChild != null) + text += getText(i); + } + return text; + } + + function TocEntry(el, text, toclevel) { + this.element = el; + this.text = text; + this.toclevel = toclevel; + } + + function tocEntries(el, toclevels) { + var result = new Array; + var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); + // Function that scans the DOM tree for header elements (the DOM2 + // nodeIterator API would be a better technique but not supported by all + // browsers). + var iterate = function (el) { + for (var i = el.firstChild; i != null; i = i.nextSibling) { + if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { + var mo = re.exec(i.tagName); + if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { + result[result.length] = new TocEntry(i, getText(i), mo[1]-1); + } + iterate(i); + } + } + } + iterate(el); + return result; + } + + var toc = document.getElementById("toc"); + if (!toc) { + return; + } + + // Delete existing TOC entries in case we're reloading the TOC. + var tocEntriesToRemove = []; + var i; + for (i = 0; i < toc.childNodes.length; i++) { + var entry = toc.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' + && entry.getAttribute("class") + && entry.getAttribute("class").match(/^toclevel/)) + tocEntriesToRemove.push(entry); + } + for (i = 0; i < tocEntriesToRemove.length; i++) { + toc.removeChild(tocEntriesToRemove[i]); + } + + // Rebuild TOC entries. + var entries = tocEntries(document.getElementById("content"), toclevels); + for (var i = 0; i < entries.length; ++i) { + var entry = entries[i]; + if (entry.element.id == "") + entry.element.id = "_toc_" + i; + var a = document.createElement("a"); + a.href = "#" + entry.element.id; + a.appendChild(document.createTextNode(entry.text)); + var div = document.createElement("div"); + div.appendChild(a); + div.className = "toclevel" + entry.toclevel; + toc.appendChild(div); + } + if (entries.length == 0) + toc.parentNode.removeChild(toc); +}, + + +///////////////////////////////////////////////////////////////////// +// Footnotes generator +///////////////////////////////////////////////////////////////////// + +/* Based on footnote generation code from: + * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html + */ + +footnotes: function () { + // Delete existing footnote entries in case we're reloading the footnodes. + var i; + var noteholder = document.getElementById("footnotes"); + if (!noteholder) { + return; + } + var entriesToRemove = []; + for (i = 0; i < noteholder.childNodes.length; i++) { + var entry = noteholder.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") + entriesToRemove.push(entry); + } + for (i = 0; i < entriesToRemove.length; i++) { + noteholder.removeChild(entriesToRemove[i]); + } + + // Rebuild footnote entries. + var cont = document.getElementById("content"); + var spans = cont.getElementsByTagName("span"); + var refs = {}; + var n = 0; + for (i=0; i<spans.length; i++) { + if (spans[i].className == "footnote") { + n++; + var note = spans[i].getAttribute("data-note"); + if (!note) { + // Use [\s\S] in place of . so multi-line matches work. + // Because JavaScript has no s (dotall) regex flag. + note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; + spans[i].innerHTML = + "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + + "' title='View footnote' class='footnote'>" + n + "</a>]"; + spans[i].setAttribute("data-note", note); + } + noteholder.innerHTML += + "<div class='footnote' id='_footnote_" + n + "'>" + + "<a href='#_footnoteref_" + n + "' title='Return to text'>" + + n + "</a>. " + note + "</div>"; + var id =spans[i].getAttribute("id"); + if (id != null) refs["#"+id] = n; + } + } + if (n == 0) + noteholder.parentNode.removeChild(noteholder); + else { + // Process footnoterefs. + for (i=0; i<spans.length; i++) { + if (spans[i].className == "footnoteref") { + var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); + href = href.match(/#.*/)[0]; // Because IE return full URL. + n = refs[href]; + spans[i].innerHTML = + "[<a href='#_footnote_" + n + + "' title='View footnote' class='footnote'>" + n + "</a>]"; + } + } + } +}, + +install: function(toclevels) { + var timerId; + + function reinstall() { + asciidoc.footnotes(); + if (toclevels) { + asciidoc.toc(toclevels); + } + } + + function reinstallAndRemoveTimer() { + clearInterval(timerId); + reinstall(); + } + + timerId = setInterval(reinstall, 500); + if (document.addEventListener) + document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); + else + window.onload = reinstallAndRemoveTimer; +} + +} diff --git a/static/niwi.css b/static/niwi.css new file mode 100644 index 0000000..08005bf --- /dev/null +++ b/static/niwi.css @@ -0,0 +1,607 @@ +@import url("https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Anonymous+Pro:400,700"); + +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ + +/* Default font. */ +body { + font-family: Georgia,serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Arial,Helvetica,sans-serif; +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} +h5 { + font-size: 1.0em; +} + +div.sectionbody { + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} +ul > li { color: #aaa; } +ul > li > * { color: black; } + +pre { + padding: 0; + margin: 0; + font-size: 14px; +} + +#author { + color: #527bbd; + font-weight: bold; + font-size: 1.1em; +} +#email { +} +#revnumber, #revdate, #revremark { +} + +#footer { + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +#footer-text { + float: left; + padding-bottom: 0.5em; +} +#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.0em; + margin-bottom: 2.0em; + margin-right: 10%; + color: #606060; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid #dddddd; + border-left: 4px solid #f0f0f0; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid #dddddd; + border-left: 5px solid #f0f0f0; + background: #f8f8f8; + padding: 0.5em; +} + +div.quoteblock, div.verseblock { + padding-left: 1.0em; + margin-left: 1.0em; + margin-right: 10%; + border-left: 5px solid #f0f0f0; + color: #777777; +} + +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock > pre.content { + font-family: inherit; + font-size: inherit; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 3px solid #dddddd; +} + +div.exampleblock > div.content { + border-left: 3px solid #dddddd; + padding-left: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +.footnote, .footnoteref { + font-size: 0.8em; +} + +span.footnote, span.footnoteref { + vertical-align: super; +} + +#footnotes { + margin: 20px 0 20px 0; + padding: 7px 0 0 0; +} + +#footnotes div.footnote { + margin: 0 0 5px 0; +} + +#footnotes hr { + border: none; + border-top: 1px solid silver; + height: 1px; + text-align: left; + margin-left: 0; + width: 20%; + min-width: 100px; +} + +div.colist td { + padding-right: 0.5em; + padding-bottom: 0.3em; + vertical-align: top; +} +div.colist td img { + margin-top: 0.3em; +} + +@media print { + #footer-badges { display: none; } +} + +#toc { + margin-bottom: 2.5em; +} + +#toctitle { + color: #527bbd; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + + +/* + * xhtml11 specific + * + * */ + +tt { + font-family: monospace; + font-size: inherit; + color: navy; +} + +div.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.tableblock > table { + border: 3px solid #527bbd; +} +thead, p.table.header { + font-weight: bold; + color: #527bbd; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overriden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +/* + * html5 specific + * + * */ + +.monospaced { + font-family: monospace; + font-size: inherit; + color: navy; +} + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #527bbd; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #527bbd; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #527bbd; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + +/* + * manpage specific + * + * */ + +body.manpage h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +body.manpage h2 { + border-style: none; +} +body.manpage div.sectionbody { + margin-left: 3em; +} + +@media print { + body.manpage div#toc { display: none; } +} + + +/* + * Theme specific overrides of the preceding (asciidoc.css) CSS. + * + */ +body { + font-family: Garamond, Georgia, serif; + font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif; + font-size: 19px; + color: #3E4349; + line-height: 1.3em; +} +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Garmond, Georgia, serif; + font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; + border-bottom-width: 0; + color: #3E4349; +} +div.title, caption.title { color: #596673; font-weight: normal; font-size:14px; } +h1 { font-size: 240%; } +h2 { font-size: 180%; } +h3 { font-size: 150%; } +h4 { font-size: 130%; } +h5 { font-size: 115%; } +h6 { font-size: 100%; } +#header h1 { margin-top: 0; } +#toc { + color: #444444; + line-height: 1.5; + padding-top: 1.5em; +} +#toctitle { + font-size: 20px; +} +#toc a { + border-bottom: 1px dotted #999999; + color: #444444 !important; + text-decoration: none !important; +} +#toc a:hover { + border-bottom: 1px solid #6D4100; + color: #6D4100 !important; + text-decoration: none !important; +} +div.toclevel1 { margin-top: 0.2em; font-size: 16px; } +div.toclevel2 { margin-top: 0.15em; font-size: 14px; } +em, dt, td.hdlist1 { color: black; } +strong { color: #3E4349; } +a { color: #004B6B; text-decoration: none; border-bottom: 1px dotted #004B6B; } +a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; } +a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; } +div.tableblock > table, table.tableblock { border: 3px solid #E8E8E8; } +th.tableblock, td.tableblock { border: 1px solid #E8E8E8; } +ul > li > * { color: #3E4349; } +pre { + font-family: "Anonymous Pro", Consolas,Menlo,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; + font-size: 16px; +} +tt, .monospaced { + color: black; + font-family: 'Deja Vu Sans Mono', monospace; + font-size: 16px; +} +div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock > div.content { border-width: 0 0 0 3px; border-color: #E8E8E8; } +div.verseblock { border-left-width: 0; margin-left: 3em; } +div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;} +div.admonitionblock td.content { border-left: 3px solid #E8E8E8; } diff --git a/static/pygments.css b/static/pygments.css new file mode 100644 index 0000000..fdd056f --- /dev/null +++ b/static/pygments.css @@ -0,0 +1,205 @@ +.hll { +background-color:#eee; +} +.c { +color:#408090; +font-style:italic; +} +.err { +border:1px solid #FF0000; +} +.k { +color:#007020; +font-weight:bold; +} +.o { +color:#666666; +} +.cm { +color:#408090; +font-style:italic; +} +.cp { +color:#007020; +} +.c1 { +color:#408090; +font-style:italic; +} +.cs { +background-color:#FFF0F0; +color:#408090; +} +.gd { +color:#A00000; +} +.ge { +font-style:italic; +} +.gr { +color:#FF0000; +} +.gh { +color:#000080; +font-weight:bold; +} +.gi { +color:#00A000; +} +.go { +color:#303030; +} +.gp { +color:#C65D09; +font-weight:bold; +} +.gs { +font-weight:bold; +} +.gu { +color:#800080; +font-weight:bold; +} +.gt { +color:#0040D0; +} +.kc { +color:#007020; +font-weight:bold; +} +.kd { +color:#007020; +font-weight:bold; +} +.kn { +color:#007020; +font-weight:bold; +} +.kp { +color:#007020; +} +.kr { +color:#007020; +font-weight:bold; +} +.kt { +color:#902000; +} +.m { +color:#208050; +} +.s { +color:#4070A0; +} +.na { +color:#4070A0; +} +.nb { +color:#007020; +} +.nc { +color:#0E84B5; +font-weight:bold; +} +.no { +color:#60ADD5; +} +.nd { +color:#555555; +font-weight:bold; +} +.ni { +color:#D55537; +font-weight:bold; +} +.ne { +color:#007020; +} +.nf { +color:#06287E; +} +.nl { +color:#002070; +font-weight:bold; +} +.nn { +color:#0E84B5; +font-weight:bold; +} +.nt { +color:#062873; +font-weight:bold; +} +.nv { +color:#BB60D5; +} +.ow { +color:#007020; +font-weight:bold; +} +.w { +color:#BBBBBB; +} +.mf { +color:#208050; +} +.mh { +color:#208050; +} +.mi { +color:#208050; +} +.mo { +color:#208050; +} +.sb { +color:#4070A0; +} +.sc { +color:#4070A0; +} +.sd { +color:#4070A0; +font-style:italic; +} +.s2 { +color:#4070A0; +} +.se { +color:#4070A0; +font-weight:bold; +} +.sh { +color:#4070A0; +} +.si { +color:#70A0D0; +font-style:italic; +} +.sx { +color:#C65D09; +} +.sr { +color:#235388; +} +.s1 { +color:#4070A0; +} +.ss { +color:#517918; +} +.bp { +color:#007020; +} +.vc { +color:#BB60D5; +} +.vg { +color:#BB60D5; +} +.vi { +color:#BB60D5; +} +.il { +color:#208050; +} From d982d674364c5d813507416dfaa45bee81bd038d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Tue, 24 Jun 2014 08:53:41 +0000 Subject: [PATCH 03/52] Update doc --- codox/cats.core.html | 112 +++++++++++++ codox/cats.protocols.html | 12 ++ codox/cats.types.html | 17 ++ codox/css/default.css | 333 ++++++++++++++++++++++++++++++++++++++ codox/index.html | 2 + codox/js/jquery.min.js | 4 + codox/js/page_effects.js | 99 ++++++++++++ index.html | 62 ++++++- 8 files changed, 639 insertions(+), 2 deletions(-) create mode 100644 codox/cats.core.html create mode 100644 codox/cats.protocols.html create mode 100644 codox/cats.types.html create mode 100644 codox/css/default.css create mode 100644 codox/index.html create mode 100644 codox/js/jquery.min.js create mode 100644 codox/js/page_effects.js diff --git a/codox/cats.core.html b/codox/cats.core.html new file mode 100644 index 0000000..1195322 --- /dev/null +++ b/codox/cats.core.html @@ -0,0 +1,112 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter-m"><div class="inner"><span>filter-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-for-m"><div class="inner"><span>for-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-map-m"><div class="inner"><span>map-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence-m"><div class="inner"><span>sequence-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when-m"><div class="inner"><span>when-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><pre class="doc">Category Theory abstractions for Clojure +</pre><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><div class="usage"></div><pre class="doc"></pre></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><pre class="doc">Alias of fmap. +</pre></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><pre class="doc">Performs a Haskell-style left-associative fapply. +</pre></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><pre class="doc">Right-to-left composition of monads. + +Same as `>=>` with its first two arguments flipped.</pre></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><pre class="doc">Same as the two argument version of `>>=` but with the +arguments interchanged.</pre></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><pre class="doc">Left-to-right composition of monads. +</pre></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><pre class="doc">Performs a Haskell-style left-associative bind. +</pre></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><pre class="doc">Given a value inside monadic context mv and any function, +applies a function to value of mv.</pre></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><pre class="doc">Given a State instance, execute the +wrapped computation and return the resultant +value, ignoring the state. +Shortly, return the first value of pair instance +returned by `run-state` function.</pre></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><pre class="doc">Given a State instance, execute the +wrapped computation and return the resultant +state. +Shortly, return the second value of pair instance +returned by `run-state` function.</pre></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><pre class="doc">Given function inside af's conext and value inside +av's context, applies the function to value and return +a result wrapped in context of same type of av context.</pre></div><div class="public anchor" id="var-filter-m"><h3>filter-m</h3><div class="usage"><code>(filter-m p mv)</code></div><pre class="doc">Applies a predicate to a value in a `MonadZero` instance, +returning the identity element when the predicate yields false. + +Otherwise, returns the instance unchanged. + + (require '[cats.types :as t]) + (require '[cats.core :as m]) + + (m/filter-m (partial < 2) (t/just 3)) + ;=> <Just [3]> + + (m/filter-m (partial < 4) (t/just 3)) + ;=> <Nothing> +</pre></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><pre class="doc">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div><div class="public anchor" id="var-for-m"><h3>for-m</h3><div class="usage"><code>(for-m vs mf)</code></div><pre class="doc">Same as map-m but with the arguments in reverse order. + +(require '[cats.types :as t]) +(require '[cats.core :as m]) + +(m/for-m [2 3] t/just) +;=> <Just [[2 3]]> + +(m/for-m [1 2] + (fn [v] + (if (odd? v) + (t/just v) + (t/nothing)))) +;=> <Nothing> +</pre></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><pre class="doc">Return State instance with computation that returns +the current state.</pre></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><pre class="doc">Remove one level of monadic structure. +</pre></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><div class="usage"><code>(lift-m f)</code></div><pre class="doc">Lifts a function to a monadic context. + +(require '[cats.types :as t]) +(require '[cats.core :as m]) + +(def monad+ (m/lift-m +)) + +(monad+ (t/just 1) (t/just 2)) +;=> <Just [3]> + +(monad+ (t/just 1) (t/nothing)) +;=> <Nothing> +</pre></div><div class="public anchor" id="var-map-m"><h3>map-m</h3><div class="usage"><code>(map-m mf coll)</code></div><pre class="doc">Given a function that takes a value and puts it into a +monadic context, map it into the given collection +calling sequence-m on the results. + + (require '[cats.types :as t]) + (require '[cats.core :as m]) + + (m/map-m t/just [2 3]) + ;=> <Just [[2 3]]> + + (m/for-m (fn [v] + (if (odd? v) + (t/just v) + (t/nothing))) + [1 2]) + ;=> <Nothing> + </pre></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><pre class="doc">Given any value v, return it wrapped in +default/effect free context. + +This is multiarity function that with arity pure/1 +it uses the dynamic scope for resolve the current +context. With pure/2, you can force specific context +value.</pre></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><pre class="doc">Return State instance with computation that replaces +the current state with specified new state.</pre></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"></div><pre class="doc">This is a monad version of pure. +</pre></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><pre class="doc">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><pre class="doc">Given a State instance, execute the +wrapped computation and return Pair +instance with result and new state. + +(def computation (mlet [x (get-state) + y (put-state (inc x))] + (return y))) + +(def initial-state 1) +(run-state computation initial-state) + +This should be return something to: #<Pair [1 2]></pre></div><div class="public anchor" id="var-sequence-m"><h3>sequence-m</h3><div class="usage"><code>(sequence-m mvs)</code></div><pre class="doc">Given a non-empty collection of monadic values, collect +their values in a vector returned in the monadic context. + + (require '[cats.types :as t]) + (require '[cats.core :as m]) + + (m/sequence-m [(t/just 2) (t/just 3)]) + ;=> <Just [[2, 3]]> + + (m/sequence-m [(t/nothing) (t/just 3)]) + ;=> <Nothing> +</pre></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-when-m"><h3>when-m</h3><div class="usage"><code>(when-m b mv)</code></div><pre class="doc">If the expression is true, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><pre class="doc"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.protocols.html b/codox/cats.protocols.html new file mode 100644 index 0000000..d025469 --- /dev/null +++ b/codox/cats.protocols.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-bind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bind</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><pre class="doc">Cathegory theory types definition. +</pre><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc"></pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><pre class="doc">Applies the function(s) inside ag's context to the value(s) +inside av's context while preserving the context.</pre></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure ctx v)</code></div><pre class="doc">Takes any context monadic value ctx and any value v, and puts +the value v in the most minimal context of same type of ctx</pre></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc"></pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap fv f)</code></div><pre class="doc">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc">Incomplete monad type definition. +</pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><pre class="doc">Applies the function f to the value(s) inside mv's context. +</pre></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc">A `MonadZero` that supports the notion of addition. +</pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><pre class="doc">An associative addition operation. +</pre></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc">A `Monad` that supports the notion of an identity element. +</pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero ctx)</code></div><pre class="doc">The identity element for `ctx`. +</pre></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.types.html b/codox/cats.types.html new file mode 100644 index 0000000..8165f30 --- /dev/null +++ b/codox/cats.types.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><pre class="doc">Monadic types definition. +</pre><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><pre class="doc">Positional factory function for class cats.types.Continuation. +</pre></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><pre class="doc">Positional factory function for class cats.types.Either. +</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><pre class="doc">Positional factory function for class cats.types.Just. +</pre></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><pre class="doc">Positional factory function for class cats.types.Nothing. +</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><pre class="doc">Positional factory function for class cats.types.Pair. +</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><pre class="doc">Positional factory function for class cats.types.State. +</pre></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><pre class="doc">Default constructor for continuation. +</pre></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><pre class="doc">Return inner value of either monad. +</pre></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code></div><pre class="doc">Left constructor for Either type. +</pre></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code></div><pre class="doc">Right constructor for Either type. +</pre></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><pre class="doc">Transform a simple state-monad function +to State class instance. +State class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div></body></html> \ No newline at end of file diff --git a/codox/css/default.css b/codox/css/default.css new file mode 100644 index 0000000..2099fb2 --- /dev/null +++ b/codox/css/default.css @@ -0,0 +1,333 @@ +body { + font-family: Helvetica, Arial, sans-serif; + font-size: 15px; +} + +pre, code { + font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; + font-size: 9pt; +} + +h2 { + font-weight: normal; + font-size: 18pt; + padding: 7px 0 0 0; + margin: 0; +} + +#header, #content, .sidebar { + position: fixed; +} + +#header { + top: 0; + left: 0; + right: 0; + height: 20px; + background: #444; + color: #fff; + padding: 5px; +} + +#content { + top: 30px; + right: 0; + bottom: 0; + overflow: auto; + background: #fff; + color: #333; + padding: 0 1em; +} + +.sidebar { + position: fixed; + top: 30px; + bottom: 0; + overflow: auto; +} + +#namespaces { + background: #e6e6e6; + border-right: solid 1px #bbb; + left: 0; + width: 250px; +} + +#vars { + background: #eeeeee; + border-right: solid 1px #ccc; + left: 251px; + width: 200px; +} + +.namespace-index { + left: 251px; +} + +.namespace-docs { + left: 452px; +} + +#header { + background: -moz-linear-gradient(top, #555 0%, #222 100%); + background: -webkit-linear-gradient(top, #555 0%, #333 100%); + background: -o-linear-gradient(top, #555 0%, #222 100%); + background: -ms-linear-gradient(top, #555 0%, #222 100%); + background: linear-gradient(top, #555 0%, #222 100%); + box-shadow: 0 0 10px #555; + z-index: 100; +} + +#header h1 { + margin: 0; + padding: 0; + font-size: 12pt; + font-weight: lighter; + text-shadow: -1px -1px 0px #333; +} + +#header a, .sidebar a { + display: block; + text-decoration: none; +} + +#header a { + color: #fff; +} + +.sidebar a { + color: #333; +} + +#header h2 { + float: right; + font-size: 9pt; + font-weight: normal; + margin: 3px 3px; + padding: 0; + color: #bbb; +} + +#header h2 a { + display: inline; +} + +.sidebar h3 { + margin: 0; + padding: 10px 0.5em 0 0.5em; + font-size: 14pt; + font-weight: normal +} + +.sidebar ul { + padding: 0.5em 0em; + margin: 0; +} + +.sidebar li { + display: block; + vertical-align: middle; +} + +.sidebar li a, .sidebar li .no-link { + border-left: 3px solid transparent; + padding: 0 7px; +} + +.sidebar li .no-link { + display: block; + color: #777; + font-style: italic; +} + +.sidebar li .inner { + display: inline-block; + padding-top: 7px; + height: 24px; +} + +.sidebar li a, .sidebar li .tree { + height: 31px; +} + +.depth-1 .inner { padding-left: 2px; } +.depth-2 .inner { padding-left: 6px; } +.depth-3 .inner { padding-left: 20px; } +.depth-4 .inner { padding-left: 34px; } +.depth-5 .inner { padding-left: 48px; } +.depth-6 .inner { padding-left: 62px; } + +.sidebar li .tree { + display: block; + float: left; + position: relative; + top: -10px; + margin: 0 4px 0 0; + padding: 0; +} + +.sidebar li.depth-1 .tree { + display: none; +} + +.sidebar li .tree .top, .sidebar li .tree .bottom { + display: block; + margin: 0; + padding: 0; + width: 7px; +} + +.sidebar li .tree .top { + border-left: 1px solid #aaa; + border-bottom: 1px solid #aaa; + height: 19px; +} + +.sidebar li .tree .bottom { + height: 22px; +} + +.sidebar li.branch .tree .bottom { + border-left: 1px solid #aaa; +} + +#namespaces li.current a { + border-left: 3px solid #a33; + color: #a33; +} + +#vars li.current a { + border-left: 3px solid #33a; + color: #33a; +} + +#content h3 { + font-size: 13pt; + font-weight: bold; +} + +.public h3 { + margin: 0; + float: left; +} + +.usage { + clear: both; +} + +h4.type, h4.added, h4.deprecated { + margin: 0; + float: left; + font-variant: small-caps; + font-size: 13px; + font-weight: bold; + margin-top: 3px; + margin-left: 10px; +} + +h4.type { + color: #717171; +} + +h4.added { + color: #508820; +} + +h4.deprecated { + color: #880000; +} + +.public { + margin-top: 1.8em; + margin-bottom: 2.4em; +} + +.public:last-child { + margin-bottom: 20%; +} + +.members .public:last-child { + margin-bottom: 0; +} + +.members { + margin: 15px 0; +} + +.members h4 { + color: #555; + font-weight: normal; + font-variant: small-caps; + margin: 0 0 5px 0; +} + +.members .inner { + padding-top: 5px; + padding-left: 15px; + margin-top: 2px; + margin-left: 4px; + border-left: 1px solid #bbb; +} + +#content .members .inner h3 { + font-size: 12pt; +} + +.members .public { + margin-top: 0; + margin-bottom: 1em; +} + +.namespace { + margin-bottom: 30px; +} + +.namespace:last-child { + margin-bottom: 10%; +} + +.index { + padding: 0; + font-size: 80%; + margin: 15px 0; +} + +.index * { + display: inline; +} + +.index li { + padding: 0 .5em; +} + +.index ul { + padding-left: 0; +} + +.usage code { + display: block; + color: #008; +} + +.usage code:first-child { + padding-top: 0.5em; +} + +div.doc { + margin-top: 10px; + margin-bottom: 20px; +} + +pre.doc { + margin: 10px 0; +} + +.src-link a { + background: #f6f6f6; + border: 1px solid #e4e4e4; + border-radius: 2px; + font-size: 70%; + padding: 1px 4px; + text-decoration: none; + color: #5555bb; +} \ No newline at end of file diff --git a/codox/index.html b/codox/index.html new file mode 100644 index 0000000..07bfa2a --- /dev/null +++ b/codox/index.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc">Category Theory abstractions for Clojure</div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><pre class="doc">Category Theory abstractions for Clojure</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.core.html#var-*m-context*">*m-context*</a></li><li><a href="cats.core.html#var-.3C.24.3E"><$></a></li><li><a href="cats.core.html#var-.3C*.3E"><*></a></li><li><a href="cats.core.html#var-.3C.3D.3C"><=<</a></li><li><a href="cats.core.html#var-.3D.3C.3C">=<<</a></li><li><a href="cats.core.html#var-.3E.3D.3E">>=></a></li><li><a href="cats.core.html#var-.3E.3E.3D">>>=</a></li><li><a href="cats.core.html#var-bind">bind</a></li><li><a href="cats.core.html#var-call-cc">call-cc</a></li><li><a href="cats.core.html#var-eval-state">eval-state</a></li><li><a href="cats.core.html#var-exec-state">exec-state</a></li><li><a href="cats.core.html#var-fapply">fapply</a></li><li><a href="cats.core.html#var-filter-m">filter-m</a></li><li><a href="cats.core.html#var-fmap">fmap</a></li><li><a href="cats.core.html#var-for-m">for-m</a></li><li><a href="cats.core.html#var-get-state">get-state</a></li><li><a href="cats.core.html#var-guard">guard</a></li><li><a href="cats.core.html#var-join">join</a></li><li><a href="cats.core.html#var-lift-m">lift-m</a></li><li><a href="cats.core.html#var-map-m">map-m</a></li><li><a href="cats.core.html#var-mlet">mlet</a></li><li><a href="cats.core.html#var-mplus">mplus</a></li><li><a href="cats.core.html#var-mzero">mzero</a></li><li><a href="cats.core.html#var-pure">pure</a></li><li><a href="cats.core.html#var-put-state">put-state</a></li><li><a href="cats.core.html#var-return">return</a></li><li><a href="cats.core.html#var-run-cont">run-cont</a></li><li><a href="cats.core.html#var-run-state">run-state</a></li><li><a href="cats.core.html#var-sequence-m">sequence-m</a></li><li><a href="cats.core.html#var-swap-state">swap-state</a></li><li><a href="cats.core.html#var-when-m">when-m</a></li><li><a href="cats.core.html#var-with-context">with-context</a></li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><pre class="doc">Cathegory theory types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.protocols.html#var-Applicative">Applicative</a></li><li><a href="cats.protocols.html#var-Functor">Functor</a></li><li><a href="cats.protocols.html#var-Monad">Monad</a></li><li><a href="cats.protocols.html#var-MonadPlus">MonadPlus</a></li><li><a href="cats.protocols.html#var-MonadZero">MonadZero</a></li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><pre class="doc">Monadic types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.types.html#var--.3EContinuation">->Continuation</a></li><li><a href="cats.types.html#var--.3EEither">->Either</a></li><li><a href="cats.types.html#var--.3EJust">->Just</a></li><li><a href="cats.types.html#var--.3ENothing">->Nothing</a></li><li><a href="cats.types.html#var--.3EPair">->Pair</a></li><li><a href="cats.types.html#var--.3EState">->State</a></li><li><a href="cats.types.html#var-continuation">continuation</a></li><li><a href="cats.types.html#var-from-either">from-either</a></li><li><a href="cats.types.html#var-just">just</a></li><li><a href="cats.types.html#var-just.3F">just?</a></li><li><a href="cats.types.html#var-left">left</a></li><li><a href="cats.types.html#var-left.3F">left?</a></li><li><a href="cats.types.html#var-maybe.3F">maybe?</a></li><li><a href="cats.types.html#var-nothing">nothing</a></li><li><a href="cats.types.html#var-nothing.3F">nothing?</a></li><li><a href="cats.types.html#var-pair">pair</a></li><li><a href="cats.types.html#var-pair.3F">pair?</a></li><li><a href="cats.types.html#var-right">right</a></li><li><a href="cats.types.html#var-right.3F">right?</a></li><li><a href="cats.types.html#var-state-t">state-t</a></li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/codox/js/jquery.min.js b/codox/js/jquery.min.js new file mode 100644 index 0000000..73f33fb --- /dev/null +++ b/codox/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/codox/js/page_effects.js b/codox/js/page_effects.js new file mode 100644 index 0000000..ef8120d --- /dev/null +++ b/codox/js/page_effects.js @@ -0,0 +1,99 @@ +function visibleInParent(element) { + var position = $(element).position().top + return position > -50 && position < ($(element).offsetParent().height() - 50) +} + +function hasFragment(link, fragment) { + return $(link).attr("href").indexOf("#" + fragment) != -1 +} + +function findLinkByFragment(elements, fragment) { + return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() +} + +function scrollToCurrentVarLink(elements) { + var elements = $(elements); + var parent = elements.offsetParent(); + + if (elements.length == 0) return; + + var top = elements.first().position().top; + var bottom = elements.last().position().top + elements.last().height(); + + if (top >= 0 && bottom <= parent.height()) return; + + if (top < 0) { + parent.scrollTop(parent.scrollTop() + top); + } + else if (bottom > parent.height()) { + parent.scrollTop(parent.scrollTop() + bottom - parent.height()); + } +} + +function setCurrentVarLink() { + $('#vars a').parent().removeClass('current') + $('.anchor'). + filter(function(index) { return visibleInParent(this) }). + each(function(index, element) { + findLinkByFragment("#vars a", element.id). + parent(). + addClass('current') + }); + scrollToCurrentVarLink('#vars .current'); +} + +var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) + +function scrollPositionId(element) { + var directory = window.location.href.replace(/[^\/]+\.html$/, '') + return 'scroll::' + $(element).attr('id') + '::' + directory +} + +function storeScrollPosition(element) { + if (!hasStorage) return; + localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) + localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) +} + +function recallScrollPosition(element) { + if (!hasStorage) return; + $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) + $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) +} + +function persistScrollPosition(element) { + recallScrollPosition(element) + $(element).scroll(function() { storeScrollPosition(element) }) +} + +function sidebarContentWidth(element) { + var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) + return Math.max.apply(Math, widths) +} + +function resizeSidebars() { + var nsWidth = sidebarContentWidth('#namespaces') + 30 + var varWidth = 0 + + if ($('#vars').length != 0) { + varWidth = sidebarContentWidth('#vars') + 30 + } + + // snap to grid + var snap = 30; + nsWidth = Math.ceil(nsWidth / snap) * snap; + varWidth = Math.ceil(varWidth / snap) * snap; + + $('#namespaces').css('width', nsWidth) + $('#vars').css('width', varWidth) + $('#vars, .namespace-index').css('left', nsWidth + 1) + $('.namespace-docs').css('left', nsWidth + varWidth + 2) +} + +$(window).ready(resizeSidebars) +$(window).ready(setCurrentVarLink) +$(window).ready(function() { persistScrollPosition('#namespaces')}) +$(window).ready(function() { + $('#content').scroll(setCurrentVarLink) + $(window).resize(setCurrentVarLink) +}) diff --git a/index.html b/index.html index 67a5e36..48676fd 100644 --- a/index.html +++ b/index.html @@ -63,7 +63,8 @@ <h3 id="_philosophy">Philosophy</h3> <div class="sect1"> <h2 id="_project_maturity">Project Maturity</h2> <div class="sectionbody"> -<div class="paragraph"><p>Since <em>cats</em> is a young project there can be some API breakage.</p></div> +<div class="paragraph"><p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> +breakage.</p></div> </div> </div> <div class="sect1"> @@ -124,6 +125,63 @@ <h3 id="_get_the_code">Get the Code</h3> </div> </div> <div class="sect1"> +<h2 id="_why_another_library">Why another library?</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Because cats library:</p></div> +<div class="ulist"><ul> +<li> +<p> +targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong> +</p> +</li> +<li> +<p> +targets to have the most simple implementation for supported abstractions. +</p> +</li> +<li> +<p> +targets to have more abstractions that simple monad. +</p> +</li> +<li> +<p> +has documentation as first class citizen. +</p> +</li> +<li> +<p> +licensed under permisive license (in comparison with other libraries): BSD (2-Clause) +</p> +</li> +</ul></div> +<div class="paragraph"><p>With differences with other existing libraries:</p></div> +<div class="ulist"><ul> +<li> +<p> +The official monads library <span class="monospaced">algo.monads</span> is very good, but its approach for modeling + is slighty limited (as example, you always should specify that monad you want use instead + relying on the type). And obviously because it only has monads. +</p> +</li> +<li> +<p> +Fluokitten is the best library that we found, but the future of it is uncertain. One big + difference with fluokitten library is that <span class="monospaced">cats</span> not intends extend every clojure type + with monadic protocols, for obvious reason of monad, functor and applicative represents + context/wrapper type and it not make sense implement Functor protocol for <span class="monospaced">java.lang.String</span>. +</p> +</li> +<li> +<p> +<span class="monospaced">bwo/monads</span> is the last monads library. It is completely undocumented and its implementation + has much innecesary complexity. +</p> +</li> +</ul></div> +</div> +</div> +<div class="sect1"> <h2 id="_abstractions_reference">Abstractions Reference</h2> <div class="sectionbody"> <div class="sect2"> @@ -422,7 +480,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-06-19 02:15:27 CEST +Last updated 2014-06-24 08:47:33 UTC </div> </div> </body> From c413d70ba79978444359fc7668030a71768b5b64 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 29 Jun 2014 01:04:59 +0200 Subject: [PATCH 04/52] Update doc --- codox/cats.core.html | 87 +++++++++++++++++++++++-------------------- codox/cats.types.html | 13 +++++-- codox/index.html | 2 +- index.html | 2 +- 4 files changed, 58 insertions(+), 46 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index 1195322..d5845d8 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter-m"><div class="inner"><span>filter-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-for-m"><div class="inner"><span>for-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-map-m"><div class="inner"><span>map-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence-m"><div class="inner"><span>sequence-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when-m"><div class="inner"><span>when-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><pre class="doc">Category Theory abstractions for Clojure +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-filter"><div class="inner"><span>m-filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-for"><div class="inner"><span>m-for</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-lift"><div class="inner"><span>m-lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-map"><div class="inner"><span>m-map</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-sequence"><div class="inner"><span>m-sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-when"><div class="inner"><span>m-when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><pre class="doc">Category Theory abstractions for Clojure </pre><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><div class="usage"></div><pre class="doc"></pre></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><pre class="doc">Alias of fmap. </pre></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><pre class="doc">Performs a Haskell-style left-associative fapply. </pre></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><pre class="doc">Right-to-left composition of monads. @@ -18,7 +18,10 @@ Shortly, return the second value of pair instance returned by `run-state` function.</pre></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><pre class="doc">Given function inside af's conext and value inside av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div><div class="public anchor" id="var-filter-m"><h3>filter-m</h3><div class="usage"><code>(filter-m p mv)</code></div><pre class="doc">Applies a predicate to a value in a `MonadZero` instance, +a result wrapped in context of same type of av context.</pre></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><pre class="doc">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><pre class="doc">Return State instance with computation that returns +the current state.</pre></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><pre class="doc">Remove one level of monadic structure. +</pre></div><div class="public anchor" id="var-m-filter"><h3>m-filter</h3><div class="usage"><code>(m-filter p mv)</code></div><pre class="doc">Applies a predicate to a value in a `MonadZero` instance, returning the identity element when the predicate yields false. Otherwise, returns the instance unchanged. @@ -26,57 +29,71 @@ (require '[cats.types :as t]) (require '[cats.core :as m]) - (m/filter-m (partial < 2) (t/just 3)) + (m/m-filter (partial < 2) (t/just 3)) ;=> <Just [3]> - (m/filter-m (partial < 4) (t/just 3)) + (m/m-filter (partial < 4) (t/just 3)) ;=> <Nothing> -</pre></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><pre class="doc">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div><div class="public anchor" id="var-for-m"><h3>for-m</h3><div class="usage"><code>(for-m vs mf)</code></div><pre class="doc">Same as map-m but with the arguments in reverse order. +</pre></div><div class="public anchor" id="var-m-for"><h3>m-for</h3><div class="usage"><code>(m-for vs mf)</code></div><pre class="doc">Same as m-map but with the arguments in reverse order. (require '[cats.types :as t]) (require '[cats.core :as m]) -(m/for-m [2 3] t/just) +(m/m-for [2 3] t/just) ;=> <Just [[2 3]]> -(m/for-m [1 2] +(m/m-for [1 2] (fn [v] (if (odd? v) (t/just v) (t/nothing)))) ;=> <Nothing> -</pre></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><pre class="doc">Return State instance with computation that returns -the current state.</pre></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><pre class="doc">Remove one level of monadic structure. -</pre></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><div class="usage"><code>(lift-m f)</code></div><pre class="doc">Lifts a function to a monadic context. +</pre></div><div class="public anchor" id="var-m-lift"><h3>m-lift</h3><h4 class="type">macro</h4><div class="usage"><code>(m-lift n f)</code></div><pre class="doc">Lifts a function with the given fixed number of arguments to a +monadic context. -(require '[cats.types :as t]) -(require '[cats.core :as m]) + (require '[cats.types :as t]) + (require '[cats.core :as m]) + + (def monad+ (m/m-lift 2 +)) -(def monad+ (m/lift-m +)) + (monad+ (t/just 1) (t/just 2)) + ;=> <Just [3]> -(monad+ (t/just 1) (t/just 2)) -;=> <Just [3]> + (monad+ (t/just 1) (t/nothing)) + ;=> <Nothing> -(monad+ (t/just 1) (t/nothing)) -;=> <Nothing> -</pre></div><div class="public anchor" id="var-map-m"><h3>map-m</h3><div class="usage"><code>(map-m mf coll)</code></div><pre class="doc">Given a function that takes a value and puts it into a + (monad+ [0 2 4] [1 2]) + ;=> [1 2 3 4 5 6] +</pre></div><div class="public anchor" id="var-m-map"><h3>m-map</h3><div class="usage"><code>(m-map mf coll)</code></div><pre class="doc">Given a function that takes a value and puts it into a monadic context, map it into the given collection -calling sequence-m on the results. +calling m-sequence on the results. (require '[cats.types :as t]) (require '[cats.core :as m]) - (m/map-m t/just [2 3]) + (m/m-map t/just [2 3]) ;=> <Just [[2 3]]> - (m/for-m (fn [v] - (if (odd? v) - (t/just v) - (t/nothing))) - [1 2]) + (m/m-map (fn [v] + (if (odd? v) + (t/just v) + (t/nothing))) + [1 2]) + ;=> <Nothing> + </pre></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><pre class="doc">Given a non-empty collection of monadic values, collect +their values in a vector returned in the monadic context. + + (require '[cats.types :as t]) + (require '[cats.core :as m]) + + (m/m-sequence [(t/just 2) (t/just 3)]) + ;=> <Just [[2, 3]]> + + (m/m-sequence [(t/nothing) (t/just 3)]) ;=> <Nothing> - </pre></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><pre class="doc">Given any value v, return it wrapped in +</pre></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><pre class="doc">If the expression is true, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><pre class="doc">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 @@ -96,17 +113,5 @@ (def initial-state 1) (run-state computation initial-state) -This should be return something to: #<Pair [1 2]></pre></div><div class="public anchor" id="var-sequence-m"><h3>sequence-m</h3><div class="usage"><code>(sequence-m mvs)</code></div><pre class="doc">Given a non-empty collection of monadic values, collect -their values in a vector returned in the monadic context. - - (require '[cats.types :as t]) - (require '[cats.core :as m]) - - (m/sequence-m [(t/just 2) (t/just 3)]) - ;=> <Just [[2, 3]]> - - (m/sequence-m [(t/nothing) (t/just 3)]) - ;=> <Nothing> -</pre></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-when-m"><h3>when-m</h3><div class="usage"><code>(when-m b mv)</code></div><pre class="doc">If the expression is true, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><pre class="doc"></pre></div></div></body></html> \ No newline at end of file +This should be return something to: #<Pair [1 2]></pre></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><pre class="doc">Return State instance with computation that applies +specified function to state and return the old state.</pre></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><pre class="doc"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.types.html b/codox/cats.types.html index 8165f30..228995b 100644 --- a/codox/cats.types.html +++ b/codox/cats.types.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><pre class="doc">Monadic types definition. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><pre class="doc">Monadic types definition. </pre><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><pre class="doc">Positional factory function for class cats.types.Continuation. </pre></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><pre class="doc">Positional factory function for class cats.types.Either. </pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><pre class="doc">Positional factory function for class cats.types.Just. @@ -8,8 +8,15 @@ </pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><pre class="doc">Positional factory function for class cats.types.State. </pre></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><pre class="doc">Default constructor for continuation. </pre></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><pre class="doc">Return inner value of either monad. -</pre></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code></div><pre class="doc">Left constructor for Either type. -</pre></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code></div><pre class="doc">Right constructor for Either type. +</pre></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><pre class="doc">Return inner value from maybe monad. + +Examples: + (from-maybe (just 1)) + ;=> 1 + (from-maybe (nothing)) + ;=> nil +</pre></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><pre class="doc">Left constructor for Either type. +</pre></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><pre class="doc">Right constructor for Either type. </pre></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><pre class="doc">Transform a simple state-monad function to State class instance. State class instance work as simple wrapper diff --git a/codox/index.html b/codox/index.html index 07bfa2a..a07f152 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc">Category Theory abstractions for Clojure</div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><pre class="doc">Category Theory abstractions for Clojure</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.core.html#var-*m-context*">*m-context*</a></li><li><a href="cats.core.html#var-.3C.24.3E"><$></a></li><li><a href="cats.core.html#var-.3C*.3E"><*></a></li><li><a href="cats.core.html#var-.3C.3D.3C"><=<</a></li><li><a href="cats.core.html#var-.3D.3C.3C">=<<</a></li><li><a href="cats.core.html#var-.3E.3D.3E">>=></a></li><li><a href="cats.core.html#var-.3E.3E.3D">>>=</a></li><li><a href="cats.core.html#var-bind">bind</a></li><li><a href="cats.core.html#var-call-cc">call-cc</a></li><li><a href="cats.core.html#var-eval-state">eval-state</a></li><li><a href="cats.core.html#var-exec-state">exec-state</a></li><li><a href="cats.core.html#var-fapply">fapply</a></li><li><a href="cats.core.html#var-filter-m">filter-m</a></li><li><a href="cats.core.html#var-fmap">fmap</a></li><li><a href="cats.core.html#var-for-m">for-m</a></li><li><a href="cats.core.html#var-get-state">get-state</a></li><li><a href="cats.core.html#var-guard">guard</a></li><li><a href="cats.core.html#var-join">join</a></li><li><a href="cats.core.html#var-lift-m">lift-m</a></li><li><a href="cats.core.html#var-map-m">map-m</a></li><li><a href="cats.core.html#var-mlet">mlet</a></li><li><a href="cats.core.html#var-mplus">mplus</a></li><li><a href="cats.core.html#var-mzero">mzero</a></li><li><a href="cats.core.html#var-pure">pure</a></li><li><a href="cats.core.html#var-put-state">put-state</a></li><li><a href="cats.core.html#var-return">return</a></li><li><a href="cats.core.html#var-run-cont">run-cont</a></li><li><a href="cats.core.html#var-run-state">run-state</a></li><li><a href="cats.core.html#var-sequence-m">sequence-m</a></li><li><a href="cats.core.html#var-swap-state">swap-state</a></li><li><a href="cats.core.html#var-when-m">when-m</a></li><li><a href="cats.core.html#var-with-context">with-context</a></li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><pre class="doc">Cathegory theory types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.protocols.html#var-Applicative">Applicative</a></li><li><a href="cats.protocols.html#var-Functor">Functor</a></li><li><a href="cats.protocols.html#var-Monad">Monad</a></li><li><a href="cats.protocols.html#var-MonadPlus">MonadPlus</a></li><li><a href="cats.protocols.html#var-MonadZero">MonadZero</a></li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><pre class="doc">Monadic types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.types.html#var--.3EContinuation">->Continuation</a></li><li><a href="cats.types.html#var--.3EEither">->Either</a></li><li><a href="cats.types.html#var--.3EJust">->Just</a></li><li><a href="cats.types.html#var--.3ENothing">->Nothing</a></li><li><a href="cats.types.html#var--.3EPair">->Pair</a></li><li><a href="cats.types.html#var--.3EState">->State</a></li><li><a href="cats.types.html#var-continuation">continuation</a></li><li><a href="cats.types.html#var-from-either">from-either</a></li><li><a href="cats.types.html#var-just">just</a></li><li><a href="cats.types.html#var-just.3F">just?</a></li><li><a href="cats.types.html#var-left">left</a></li><li><a href="cats.types.html#var-left.3F">left?</a></li><li><a href="cats.types.html#var-maybe.3F">maybe?</a></li><li><a href="cats.types.html#var-nothing">nothing</a></li><li><a href="cats.types.html#var-nothing.3F">nothing?</a></li><li><a href="cats.types.html#var-pair">pair</a></li><li><a href="cats.types.html#var-pair.3F">pair?</a></li><li><a href="cats.types.html#var-right">right</a></li><li><a href="cats.types.html#var-right.3F">right?</a></li><li><a href="cats.types.html#var-state-t">state-t</a></li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc">Category Theory abstractions for Clojure</div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><pre class="doc">Category Theory abstractions for Clojure</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.core.html#var-*m-context*">*m-context*</a></li><li><a href="cats.core.html#var-.3C.24.3E"><$></a></li><li><a href="cats.core.html#var-.3C*.3E"><*></a></li><li><a href="cats.core.html#var-.3C.3D.3C"><=<</a></li><li><a href="cats.core.html#var-.3D.3C.3C">=<<</a></li><li><a href="cats.core.html#var-.3E.3D.3E">>=></a></li><li><a href="cats.core.html#var-.3E.3E.3D">>>=</a></li><li><a href="cats.core.html#var-bind">bind</a></li><li><a href="cats.core.html#var-call-cc">call-cc</a></li><li><a href="cats.core.html#var-eval-state">eval-state</a></li><li><a href="cats.core.html#var-exec-state">exec-state</a></li><li><a href="cats.core.html#var-fapply">fapply</a></li><li><a href="cats.core.html#var-fmap">fmap</a></li><li><a href="cats.core.html#var-get-state">get-state</a></li><li><a href="cats.core.html#var-guard">guard</a></li><li><a href="cats.core.html#var-join">join</a></li><li><a href="cats.core.html#var-m-filter">m-filter</a></li><li><a href="cats.core.html#var-m-for">m-for</a></li><li><a href="cats.core.html#var-m-lift">m-lift</a></li><li><a href="cats.core.html#var-m-map">m-map</a></li><li><a href="cats.core.html#var-m-sequence">m-sequence</a></li><li><a href="cats.core.html#var-m-when">m-when</a></li><li><a href="cats.core.html#var-mlet">mlet</a></li><li><a href="cats.core.html#var-mplus">mplus</a></li><li><a href="cats.core.html#var-mzero">mzero</a></li><li><a href="cats.core.html#var-pure">pure</a></li><li><a href="cats.core.html#var-put-state">put-state</a></li><li><a href="cats.core.html#var-return">return</a></li><li><a href="cats.core.html#var-run-cont">run-cont</a></li><li><a href="cats.core.html#var-run-state">run-state</a></li><li><a href="cats.core.html#var-swap-state">swap-state</a></li><li><a href="cats.core.html#var-with-context">with-context</a></li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><pre class="doc">Cathegory theory types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.protocols.html#var-Applicative">Applicative</a></li><li><a href="cats.protocols.html#var-Functor">Functor</a></li><li><a href="cats.protocols.html#var-Monad">Monad</a></li><li><a href="cats.protocols.html#var-MonadPlus">MonadPlus</a></li><li><a href="cats.protocols.html#var-MonadZero">MonadZero</a></li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><pre class="doc">Monadic types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.types.html#var--.3EContinuation">->Continuation</a></li><li><a href="cats.types.html#var--.3EEither">->Either</a></li><li><a href="cats.types.html#var--.3EJust">->Just</a></li><li><a href="cats.types.html#var--.3ENothing">->Nothing</a></li><li><a href="cats.types.html#var--.3EPair">->Pair</a></li><li><a href="cats.types.html#var--.3EState">->State</a></li><li><a href="cats.types.html#var-continuation">continuation</a></li><li><a href="cats.types.html#var-from-either">from-either</a></li><li><a href="cats.types.html#var-from-maybe">from-maybe</a></li><li><a href="cats.types.html#var-just">just</a></li><li><a href="cats.types.html#var-just.3F">just?</a></li><li><a href="cats.types.html#var-left">left</a></li><li><a href="cats.types.html#var-left.3F">left?</a></li><li><a href="cats.types.html#var-maybe.3F">maybe?</a></li><li><a href="cats.types.html#var-nothing">nothing</a></li><li><a href="cats.types.html#var-nothing.3F">nothing?</a></li><li><a href="cats.types.html#var-pair">pair</a></li><li><a href="cats.types.html#var-pair.3F">pair?</a></li><li><a href="cats.types.html#var-right">right</a></li><li><a href="cats.types.html#var-right.3F">right?</a></li><li><a href="cats.types.html#var-state-t">state-t</a></li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 48676fd..436ea9d 100644 --- a/index.html +++ b/index.html @@ -480,7 +480,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-06-24 08:47:33 UTC +Last updated 2014-06-29 01:04:43 CEST </div> </div> </body> From e1a9ad41bddb5a5b86c5c133ba26a956a08104ed Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 29 Jun 2014 01:06:54 +0200 Subject: [PATCH 05/52] Update doc --- codox/cats.core.html | 56 +++++----- codox/cats.protocols.html | 22 ++-- codox/cats.types.html | 28 ++--- codox/css/default.css | 208 +++++++++++++++++++++++++++++--------- codox/index.html | 2 +- index.html | 2 +- 6 files changed, 215 insertions(+), 103 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index d5845d8..50e29b7 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,27 +1,27 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-filter"><div class="inner"><span>m-filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-for"><div class="inner"><span>m-for</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-lift"><div class="inner"><span>m-lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-map"><div class="inner"><span>m-map</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-sequence"><div class="inner"><span>m-sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-when"><div class="inner"><span>m-when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><pre class="doc">Category Theory abstractions for Clojure -</pre><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><div class="usage"></div><pre class="doc"></pre></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><pre class="doc">Alias of fmap. -</pre></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><pre class="doc">Performs a Haskell-style left-associative fapply. -</pre></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><pre class="doc">Right-to-left composition of monads. - -Same as `>=>` with its first two arguments flipped.</pre></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><pre class="doc">Same as the two argument version of `>>=` but with the -arguments interchanged.</pre></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><pre class="doc">Left-to-right composition of monads. -</pre></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><pre class="doc">Performs a Haskell-style left-associative bind. -</pre></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><pre class="doc">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><pre class="doc">Given a State instance, execute the +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-filter"><div class="inner"><span>m-filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-for"><div class="inner"><span>m-for</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-lift"><div class="inner"><span>m-lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-map"><div class="inner"><span>m-map</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-sequence"><div class="inner"><span>m-sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-when"><div class="inner"><span>m-when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +</pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L9">view source</a></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L75">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L83">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. + +Same as `>=>` with its first two arguments flipped.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L132">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the +arguments interchanged.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L118">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L124">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L68">view source</a></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, +applies a function to value of mv.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L33">view source</a></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L339">view source</a></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Shortly, return the first value of pair instance -returned by `run-state` function.</pre></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><pre class="doc">Given a State instance, execute the +returned by `run-state` function.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L309">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant state. Shortly, return the second value of pair instance -returned by `run-state` function.</pre></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><pre class="doc">Given function inside af's conext and value inside +returned by `run-state` function.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L318">view source</a></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><pre class="doc">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><pre class="doc">Return State instance with computation that returns -the current state.</pre></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><pre class="doc">Remove one level of monadic structure. -</pre></div><div class="public anchor" id="var-m-filter"><h3>m-filter</h3><div class="usage"><code>(m-filter p mv)</code></div><pre class="doc">Applies a predicate to a value in a `MonadZero` instance, +a result wrapped in context of same type of av context.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L61">view source</a></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L55">view source</a></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that returns +the current state.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L267">view source</a></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L49">view source</a></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L113">view source</a></div></div><div class="public anchor" id="var-m-filter"><h3>m-filter</h3><div class="usage"><code>(m-filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, returning the identity element when the predicate yields false. Otherwise, returns the instance unchanged. @@ -34,7 +34,7 @@ (m/m-filter (partial < 4) (t/just 3)) ;=> <Nothing> -</pre></div><div class="public anchor" id="var-m-for"><h3>m-for</h3><div class="usage"><code>(m-for vs mf)</code></div><pre class="doc">Same as m-map but with the arguments in reverse order. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L233">view source</a></div></div><div class="public anchor" id="var-m-for"><h3>m-for</h3><div class="usage"><code>(m-for vs mf)</code></div><div class="doc"><pre class="plaintext">Same as m-map but with the arguments in reverse order. (require '[cats.types :as t]) (require '[cats.core :as m]) @@ -48,7 +48,7 @@ (t/just v) (t/nothing)))) ;=> <Nothing> -</pre></div><div class="public anchor" id="var-m-lift"><h3>m-lift</h3><h4 class="type">macro</h4><div class="usage"><code>(m-lift n f)</code></div><pre class="doc">Lifts a function with the given fixed number of arguments to a +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L188">view source</a></div></div><div class="public anchor" id="var-m-lift"><h3>m-lift</h3><h4 class="type">macro</h4><div class="usage"><code>(m-lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a monadic context. (require '[cats.types :as t]) @@ -64,7 +64,7 @@ (monad+ [0 2 4] [1 2]) ;=> [1 2 3 4 5 6] -</pre></div><div class="public anchor" id="var-m-map"><h3>m-map</h3><div class="usage"><code>(m-map mf coll)</code></div><pre class="doc">Given a function that takes a value and puts it into a +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L207">view source</a></div></div><div class="public anchor" id="var-m-map"><h3>m-map</h3><div class="usage"><code>(m-map mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a monadic context, map it into the given collection calling m-sequence on the results. @@ -80,7 +80,7 @@ (t/nothing))) [1 2]) ;=> <Nothing> - </pre></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><pre class="doc">Given a non-empty collection of monadic values, collect + </pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L167">view source</a></div></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context. (require '[cats.types :as t]) @@ -91,18 +91,18 @@ (m/m-sequence [(t/nothing) (t/just 3)]) ;=> <Nothing> -</pre></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><pre class="doc">If the expression is true, returns the monadic value. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L142">view source</a></div></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. -Otherwise, yields nil in a monadic context.</pre></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><pre class="doc">Given any value v, return it wrapped in +Otherwise, yields nil in a monadic context.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L254">view source</a></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L91">view source</a></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L45">view source</a></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L41">view source</a></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 it uses the dynamic scope for resolve the current context. With pure/2, you can force specific context -value.</pre></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><pre class="doc">Return State instance with computation that replaces -the current state with specified new state.</pre></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"></div><pre class="doc">This is a monad version of pure. -</pre></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><pre class="doc">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><pre class="doc">Given a State instance, execute the +value.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L17">view source</a></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that replaces +the current state with specified new state.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L274">view source</a></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L30">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L331">view source</a></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return Pair instance with result and new state. @@ -113,5 +113,5 @@ (def initial-state 1) (run-state computation initial-state) -This should be return something to: #<Pair [1 2]></pre></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><pre class="doc">Return State instance with computation that applies -specified function to state and return the old state.</pre></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><pre class="doc"></pre></div></div></body></html> \ No newline at end of file +This should be return something to: #<Pair [1 2]></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L288">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that applies +specified function to state and return the old state.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L281">view source</a></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L12">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.protocols.html b/codox/cats.protocols.html index d025469..754e33e 100644 --- a/codox/cats.protocols.html +++ b/codox/cats.protocols.html @@ -1,12 +1,12 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-bind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bind</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><pre class="doc">Cathegory theory types definition. -</pre><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc"></pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><pre class="doc">Applies the function(s) inside ag's context to the value(s) -inside av's context while preserving the context.</pre></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure ctx v)</code></div><pre class="doc">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc"></pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap fv f)</code></div><pre class="doc">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc">Incomplete monad type definition. -</pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><pre class="doc">Applies the function f to the value(s) inside mv's context. -</pre></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc">A `MonadZero` that supports the notion of addition. -</pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><pre class="doc">An associative addition operation. -</pre></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><pre class="doc">A `Monad` that supports the notion of an identity element. -</pre><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero ctx)</code></div><pre class="doc">The identity element for `ctx`. -</pre></div></div></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-bind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bind</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) +inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure ctx v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts +the value v in the most minimal context of same type of ctx</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L7">view source</a></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap fv f)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L4">view source</a></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">Incomplete monad type definition. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Applies the function f to the value(s) inside mv's context. +</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L15">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. +</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L23">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero ctx)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. +</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L19">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.types.html b/codox/cats.types.html index 228995b..381a880 100644 --- a/codox/cats.types.html +++ b/codox/cats.types.html @@ -1,24 +1,24 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><pre class="doc">Monadic types definition. -</pre><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><pre class="doc">Positional factory function for class cats.types.Continuation. -</pre></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><pre class="doc">Positional factory function for class cats.types.Either. -</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><pre class="doc">Positional factory function for class cats.types.Just. -</pre></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><pre class="doc">Positional factory function for class cats.types.Nothing. -</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><pre class="doc">Positional factory function for class cats.types.Pair. -</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><pre class="doc">Positional factory function for class cats.types.State. -</pre></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><pre class="doc">Default constructor for continuation. -</pre></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><pre class="doc">Return inner value of either monad. -</pre></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><pre class="doc">Return inner value from maybe monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><div class="doc"><pre class="plaintext">Monadic types definition. +</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Continuation. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L322">view source</a></div></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Either. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L9">view source</a></div></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Just. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L115">view source</a></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Nothing. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L83">view source</a></div></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Pair. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L240">view source</a></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.State. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L288">view source</a></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L342">view source</a></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L74">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Examples: (from-maybe (just 1)) ;=> 1 (from-maybe (nothing)) ;=> nil -</pre></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><pre class="doc">Left constructor for Either type. -</pre></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><pre class="doc">Right constructor for Either type. -</pre></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><pre class="doc"></pre></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><pre class="doc">Transform a simple state-monad function +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L178">view source</a></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L155">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L170">view source</a></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L52">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L66">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L165">view source</a></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L161">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L174">view source</a></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L271">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L276">view source</a></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L59">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L70">view source</a></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function to State class instance. State class instance work as simple wrapper for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div></body></html> \ No newline at end of file +extend plain function type of clojure.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L309">view source</a></div></div></div></body></html> \ No newline at end of file diff --git a/codox/css/default.css b/codox/css/default.css index 2099fb2..81cb803 100644 --- a/codox/css/default.css +++ b/codox/css/default.css @@ -6,12 +6,13 @@ body { pre, code { font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; font-size: 9pt; + margin: 15px 0; } h2 { font-weight: normal; - font-size: 18pt; - padding: 7px 0 0 0; + font-size: 28px; + padding: 10px 0 2px 0; margin: 0; } @@ -26,7 +27,7 @@ h2 { height: 20px; background: #444; color: #fff; - padding: 5px; + padding: 5px 7px; } #content { @@ -36,7 +37,7 @@ h2 { overflow: auto; background: #fff; color: #333; - padding: 0 1em; + padding: 0 18px; } .sidebar { @@ -47,15 +48,15 @@ h2 { } #namespaces { - background: #e6e6e6; - border-right: solid 1px #bbb; + background: #e2e2e2; + border-right: solid 1px #cccccc; left: 0; width: 250px; } #vars { - background: #eeeeee; - border-right: solid 1px #ccc; + background: #f2f2f2; + border-right: solid 1px #cccccc; left: 251px; width: 200px; } @@ -74,7 +75,7 @@ h2 { background: -o-linear-gradient(top, #555 0%, #222 100%); background: -ms-linear-gradient(top, #555 0%, #222 100%); background: linear-gradient(top, #555 0%, #222 100%); - box-shadow: 0 0 10px #555; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); z-index: 100; } @@ -114,9 +115,9 @@ h2 { .sidebar h3 { margin: 0; - padding: 10px 0.5em 0 0.5em; - font-size: 14pt; - font-weight: normal + padding: 10px 10px 0 10px; + font-size: 19px; + font-weight: normal; } .sidebar ul { @@ -132,6 +133,7 @@ h2 { .sidebar li a, .sidebar li .no-link { border-left: 3px solid transparent; padding: 0 7px; + white-space: nowrap; } .sidebar li .no-link { @@ -215,31 +217,10 @@ h2 { clear: both; } -h4.type, h4.added, h4.deprecated { - margin: 0; - float: left; - font-variant: small-caps; - font-size: 13px; - font-weight: bold; - margin-top: 3px; - margin-left: 10px; -} - -h4.type { - color: #717171; -} - -h4.added { - color: #508820; -} - -h4.deprecated { - color: #880000; -} - .public { - margin-top: 1.8em; - margin-bottom: 2.4em; + padding-top: 12px; + margin-top: 15px; + margin-bottom: 28px; } .public:last-child { @@ -276,6 +257,46 @@ h4.deprecated { .members .public { margin-top: 0; margin-bottom: 1em; + padding-top: 6px; +} + +.members .public:first-child { + padding-top: 0; +} + +.public h4.type, +.public h4.dynamic, +.public h4.added, +.public h4.deprecated { + margin: 0; + float: left; + font-variant: small-caps; + font-size: 13px; + font-weight: bold; + margin-top: 3px; + margin-left: 10px; +} + +.members h4.type, +.members h4.added, +.members h4.deprecated { + margin-top: 1px; +} + +h4.type { + color: #717171; +} + +h4.dynamic { + color: #9933aa; +} + +h4.added { + color: #508820; +} + +h4.deprecated { + color: #880000; } .namespace { @@ -287,45 +308,136 @@ h4.deprecated { } .index { - padding: 0; - font-size: 80%; - margin: 15px 0; + padding: 0; + font-size: 80%; + margin: 15px 0; + line-height: 16px; } .index * { - display: inline; + display: inline; +} + +.index p { + padding-right: 3px; } .index li { - padding: 0 .5em; + padding-right: 5px; } .index ul { - padding-left: 0; + padding-left: 0; } .usage code { display: block; color: #008; + margin: 2px 0; } .usage code:first-child { - padding-top: 0.5em; + padding-top: 10px; } -div.doc { - margin-top: 10px; +p { + margin: 15px 0; +} + +.public p:first-child, .public pre.plaintext { + margin-top: 12px; +} + +.doc { + margin: 0; +} + +.namespace-index .doc { margin-bottom: 20px; } -pre.doc { - margin: 10px 0; +.namespace-index .namespace .doc { + margin-bottom: 10px; } -.src-link a { +.markdown { + line-height: 18px; + font-size: 14px; +} + +.markdown, .namespace .index { + max-width: 680px; + overflow-x: visible; +} + +.namespace-docs .markdown { + padding-bottom: 15px; +} + +.markdown p:last-child { + margin-bottom: 0; +} + +.markdown code, .src-link a { background: #f6f6f6; border: 1px solid #e4e4e4; border-radius: 2px; +} + +.markdown pre { + background: #f4f4f4; + border: 1px solid #e0e0e0; + border-radius: 2px; + padding: 5px 10px; + margin: 0 10px; +} + +.markdown pre code { + background: transparent; + border: none; +} + +.doc ul, .doc ol { + padding-left: 30px; +} + +.doc table { + border-collapse: collapse; + margin: 0 10px; +} + +.doc table td, .doc table th { + border: 1px solid #dddddd; + padding: 4px 6px; +} + +.doc table th { + background: #f2f2f2; +} + +.doc dl { + margin: 0 10px 20px 10px; +} + +.doc dl dt { + font-weight: bold; + margin: 0; + padding: 3px 0; + border-bottom: 1px solid #ddd; +} + +.doc dl dd { + padding: 5px 0; + margin: 0 0 5px 10px; +} + +.doc abbr { + border-bottom: 1px dotted #333; + font-variant: none + cursor: help; +} + +.src-link a { font-size: 70%; padding: 1px 4px; text-decoration: none; diff --git a/codox/index.html b/codox/index.html index a07f152..0dd3ccd 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc">Category Theory abstractions for Clojure</div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><pre class="doc">Category Theory abstractions for Clojure</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.core.html#var-*m-context*">*m-context*</a></li><li><a href="cats.core.html#var-.3C.24.3E"><$></a></li><li><a href="cats.core.html#var-.3C*.3E"><*></a></li><li><a href="cats.core.html#var-.3C.3D.3C"><=<</a></li><li><a href="cats.core.html#var-.3D.3C.3C">=<<</a></li><li><a href="cats.core.html#var-.3E.3D.3E">>=></a></li><li><a href="cats.core.html#var-.3E.3E.3D">>>=</a></li><li><a href="cats.core.html#var-bind">bind</a></li><li><a href="cats.core.html#var-call-cc">call-cc</a></li><li><a href="cats.core.html#var-eval-state">eval-state</a></li><li><a href="cats.core.html#var-exec-state">exec-state</a></li><li><a href="cats.core.html#var-fapply">fapply</a></li><li><a href="cats.core.html#var-fmap">fmap</a></li><li><a href="cats.core.html#var-get-state">get-state</a></li><li><a href="cats.core.html#var-guard">guard</a></li><li><a href="cats.core.html#var-join">join</a></li><li><a href="cats.core.html#var-m-filter">m-filter</a></li><li><a href="cats.core.html#var-m-for">m-for</a></li><li><a href="cats.core.html#var-m-lift">m-lift</a></li><li><a href="cats.core.html#var-m-map">m-map</a></li><li><a href="cats.core.html#var-m-sequence">m-sequence</a></li><li><a href="cats.core.html#var-m-when">m-when</a></li><li><a href="cats.core.html#var-mlet">mlet</a></li><li><a href="cats.core.html#var-mplus">mplus</a></li><li><a href="cats.core.html#var-mzero">mzero</a></li><li><a href="cats.core.html#var-pure">pure</a></li><li><a href="cats.core.html#var-put-state">put-state</a></li><li><a href="cats.core.html#var-return">return</a></li><li><a href="cats.core.html#var-run-cont">run-cont</a></li><li><a href="cats.core.html#var-run-state">run-state</a></li><li><a href="cats.core.html#var-swap-state">swap-state</a></li><li><a href="cats.core.html#var-with-context">with-context</a></li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><pre class="doc">Cathegory theory types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.protocols.html#var-Applicative">Applicative</a></li><li><a href="cats.protocols.html#var-Functor">Functor</a></li><li><a href="cats.protocols.html#var-Monad">Monad</a></li><li><a href="cats.protocols.html#var-MonadPlus">MonadPlus</a></li><li><a href="cats.protocols.html#var-MonadZero">MonadZero</a></li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><pre class="doc">Monadic types definition.</pre><div class="index"><p>Public variables and functions:</p><ul><li><a href="cats.types.html#var--.3EContinuation">->Continuation</a></li><li><a href="cats.types.html#var--.3EEither">->Either</a></li><li><a href="cats.types.html#var--.3EJust">->Just</a></li><li><a href="cats.types.html#var--.3ENothing">->Nothing</a></li><li><a href="cats.types.html#var--.3EPair">->Pair</a></li><li><a href="cats.types.html#var--.3EState">->State</a></li><li><a href="cats.types.html#var-continuation">continuation</a></li><li><a href="cats.types.html#var-from-either">from-either</a></li><li><a href="cats.types.html#var-from-maybe">from-maybe</a></li><li><a href="cats.types.html#var-just">just</a></li><li><a href="cats.types.html#var-just.3F">just?</a></li><li><a href="cats.types.html#var-left">left</a></li><li><a href="cats.types.html#var-left.3F">left?</a></li><li><a href="cats.types.html#var-maybe.3F">maybe?</a></li><li><a href="cats.types.html#var-nothing">nothing</a></li><li><a href="cats.types.html#var-nothing.3F">nothing?</a></li><li><a href="cats.types.html#var-pair">pair</a></li><li><a href="cats.types.html#var-pair.3F">pair?</a></li><li><a href="cats.types.html#var-right">right</a></li><li><a href="cats.types.html#var-right.3F">right?</a></li><li><a href="cats.types.html#var-state-t">state-t</a></li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-m-filter">m-filter</a> </li><li> <a href="cats.core.html#var-m-for">m-for</a> </li><li> <a href="cats.core.html#var-m-lift">m-lift</a> </li><li> <a href="cats.core.html#var-m-map">m-map</a> </li><li> <a href="cats.core.html#var-m-sequence">m-sequence</a> </li><li> <a href="cats.core.html#var-m-when">m-when</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 436ea9d..47b2982 100644 --- a/index.html +++ b/index.html @@ -480,7 +480,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-06-29 01:04:43 CEST +Last updated 2014-06-29 01:05:03 CEST </div> </div> </body> From f20cf4559357db45d81e32227c2176373da0d174 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 29 Jun 2014 01:09:00 +0200 Subject: [PATCH 06/52] Update doc --- codox/cats.core.html | 54 +++++++++++++++++++-------------------- codox/cats.protocols.html | 10 ++++---- codox/cats.types.html | 24 ++++++++--------- index.html | 2 +- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index 50e29b7..1f80b6f 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,27 +1,27 @@ <!DOCTYPE html> <html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-filter"><div class="inner"><span>m-filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-for"><div class="inner"><span>m-for</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-lift"><div class="inner"><span>m-lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-map"><div class="inner"><span>m-map</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-sequence"><div class="inner"><span>m-sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-when"><div class="inner"><span>m-when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L9">view source</a></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L75">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L83">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. - -Same as `>=>` with its first two arguments flipped.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L132">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the -arguments interchanged.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L118">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L124">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L68">view source</a></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L33">view source</a></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L339">view source</a></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +</pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. +</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. + +Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the +arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. +</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. +</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, +applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Shortly, return the first value of pair instance -returned by `run-state` function.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L309">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant state. Shortly, return the second value of pair instance -returned by `run-state` function.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L318">view source</a></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L61">view source</a></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L55">view source</a></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that returns -the current state.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L267">view source</a></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L49">view source</a></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L113">view source</a></div></div><div class="public anchor" id="var-m-filter"><h3>m-filter</h3><div class="usage"><code>(m-filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, +a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that returns +the current state.</pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-m-filter"><h3>m-filter</h3><div class="usage"><code>(m-filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, returning the identity element when the predicate yields false. Otherwise, returns the instance unchanged. @@ -34,7 +34,7 @@ (m/m-filter (partial < 4) (t/just 3)) ;=> <Nothing> -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L233">view source</a></div></div><div class="public anchor" id="var-m-for"><h3>m-for</h3><div class="usage"><code>(m-for vs mf)</code></div><div class="doc"><pre class="plaintext">Same as m-map but with the arguments in reverse order. +</pre></div></div><div class="public anchor" id="var-m-for"><h3>m-for</h3><div class="usage"><code>(m-for vs mf)</code></div><div class="doc"><pre class="plaintext">Same as m-map but with the arguments in reverse order. (require '[cats.types :as t]) (require '[cats.core :as m]) @@ -48,7 +48,7 @@ (t/just v) (t/nothing)))) ;=> <Nothing> -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L188">view source</a></div></div><div class="public anchor" id="var-m-lift"><h3>m-lift</h3><h4 class="type">macro</h4><div class="usage"><code>(m-lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a +</pre></div></div><div class="public anchor" id="var-m-lift"><h3>m-lift</h3><h4 class="type">macro</h4><div class="usage"><code>(m-lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a monadic context. (require '[cats.types :as t]) @@ -64,7 +64,7 @@ (monad+ [0 2 4] [1 2]) ;=> [1 2 3 4 5 6] -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L207">view source</a></div></div><div class="public anchor" id="var-m-map"><h3>m-map</h3><div class="usage"><code>(m-map mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a +</pre></div></div><div class="public anchor" id="var-m-map"><h3>m-map</h3><div class="usage"><code>(m-map mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a monadic context, map it into the given collection calling m-sequence on the results. @@ -80,7 +80,7 @@ (t/nothing))) [1 2]) ;=> <Nothing> - </pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L167">view source</a></div></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect + </pre></div></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context. (require '[cats.types :as t]) @@ -91,18 +91,18 @@ (m/m-sequence [(t/nothing) (t/just 3)]) ;=> <Nothing> -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L142">view source</a></div></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. +</pre></div></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. -Otherwise, yields nil in a monadic context.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L254">view source</a></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L91">view source</a></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L45">view source</a></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L41">view source</a></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 it uses the dynamic scope for resolve the current context. With pure/2, you can force specific context -value.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L17">view source</a></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that replaces -the current state with specified new state.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L274">view source</a></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"></div><div class="doc"><pre class="plaintext">This is a monad version of pure. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L30">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L331">view source</a></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +value.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that replaces +the current state with specified new state.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +</pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return Pair instance with result and new state. @@ -113,5 +113,5 @@ (def initial-state 1) (run-state computation initial-state) -This should be return something to: #<Pair [1 2]></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L288">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that applies -specified function to state and return the old state.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L281">view source</a></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/core.clj#L12">view source</a></div></div></div></body></html> \ No newline at end of file +This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that applies +specified function to state and return the old state.</pre></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.protocols.html b/codox/cats.protocols.html index 754e33e..27ee80d 100644 --- a/codox/cats.protocols.html +++ b/codox/cats.protocols.html @@ -2,11 +2,11 @@ <html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-bind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bind</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. </pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure ctx v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L7">view source</a></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap fv f)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L4">view source</a></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">Incomplete monad type definition. +the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap fv f)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">Incomplete monad type definition. </pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Applies the function f to the value(s) inside mv's context. -</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L15">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. </pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. -</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L23">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. </pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero ctx)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. -</pre></div></div></div></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/protocols.clj#L19">view source</a></div></div></div></body></html> \ No newline at end of file +</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.types.html b/codox/cats.types.html index 381a880..91cae83 100644 --- a/codox/cats.types.html +++ b/codox/cats.types.html @@ -1,24 +1,24 @@ <!DOCTYPE html> <html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><div class="doc"><pre class="plaintext">Monadic types definition. </pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Continuation. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L322">view source</a></div></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Either. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L9">view source</a></div></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Just. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L115">view source</a></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Nothing. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L83">view source</a></div></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Pair. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L240">view source</a></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.State. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L288">view source</a></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L342">view source</a></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L74">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. +</pre></div></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Either. +</pre></div></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Just. +</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Nothing. +</pre></div></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Pair. +</pre></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.State. +</pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Examples: (from-maybe (just 1)) ;=> 1 (from-maybe (nothing)) ;=> nil -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L178">view source</a></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L155">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L170">view source</a></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L52">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L66">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L165">view source</a></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L161">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L174">view source</a></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L271">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L276">view source</a></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L59">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L70">view source</a></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function to State class instance. State class instance work as simple wrapper for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div><div class="src-link"><a href="https://github.com/niwibe/cats/blob/master/target/classes/cats/types.clj#L309">view source</a></div></div></div></body></html> \ No newline at end of file +extend plain function type of clojure.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 47b2982..68da95a 100644 --- a/index.html +++ b/index.html @@ -480,7 +480,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-06-29 01:05:03 CEST +Last updated 2014-06-29 01:08:27 CEST </div> </div> </body> From a76c7b9b2d086e0f80ae49edb4c879413e8c3876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Mon, 30 Jun 2014 21:26:32 +0200 Subject: [PATCH 07/52] Update doc --- index.html | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 68da95a..8f366e6 100644 --- a/index.html +++ b/index.html @@ -295,7 +295,7 @@ <h3 id="_monad">Monad</h3> <div class="paragraph"><p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and put new value in a completely different context.</p></div> <div class="listingblock"> -<div class="title">This is aspect of Monad protocol</div> +<div class="title">This is the aspect of the Monad protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Monad</span> <span class="s">"Incomplete monad type definition."</span> <span class="p">(</span><span class="nf">bind</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">f</span><span class="p">]</span> <span class="s">"Applies the function f to the value(s) inside mv's context."</span><span class="p">))</span> @@ -333,6 +333,37 @@ <h3 id="_monad">Monad</h3> </pre></div></div></div> <div class="paragraph"><p>TODO: document other more advanced options like <span class="monospaced">:let</span> and <span class="monospaced">:when</span> in a <span class="monospaced">mlet</span> context.</p></div> </div> +<div class="sect2"> +<h3 id="_monadzero">MonadZero</h3> +<div class="paragraph"><p>The MonadZero (<a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero</a>) protocol represents a monad that has a notion of an identity element.</p></div> +<div class="listingblock"> +<div class="title">This is the aspect of the MonadZero protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadZero</span> + <span class="s">"A `Monad` that supports the notion of an identity element."</span> + <span class="p">(</span><span class="nf">mzero</span> <span class="p">[</span><span class="nv">ctx</span><span class="p">]</span> <span class="s">"The identity element for `ctx`."</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p>The <span class="monospaced">bind</span> operation on the identity element satisfies Left Zero:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> + +<span class="p">(</span><span class="nb">= </span><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> + <span class="p">(</span><span class="nf">>>=</span> <span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> <span class="nv">just</span><span class="p">))</span> +<span class="c1">;; => true</span> +</pre></div></div></div> +<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:where</span> clauses can be used in <span class="monospaced">mlet</span> bindings:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</span> + <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="p">(</span><span class="nf">return</span> <span class="nv">i</span><span class="p">))</span> +<span class="c1">;; => [3 4 5]</span> + +<span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">(</span><span class="nf">t/just</span> <span class="mi">2</span><span class="p">)</span> + <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="p">(</span><span class="nf">m/return</span> <span class="nv">i</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +</div> </div> </div> <div class="sect1"> @@ -480,7 +511,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-06-29 01:08:27 CEST +Last updated 2014-06-30 21:25:57 CEST </div> </div> </body> From 2b1bb2b6ad8863532aa573a2d7dc26cede2597f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Mon, 30 Jun 2014 21:30:08 +0200 Subject: [PATCH 08/52] Update doc --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 8f366e6..8f45a87 100644 --- a/index.html +++ b/index.html @@ -335,7 +335,7 @@ <h3 id="_monad">Monad</h3> </div> <div class="sect2"> <h3 id="_monadzero">MonadZero</h3> -<div class="paragraph"><p>The MonadZero (<a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero</a>) protocol represents a monad that has a notion of an identity element.</p></div> +<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">MonadZero</a> protocol represents a monad that has a notion of an identity element.</p></div> <div class="listingblock"> <div class="title">This is the aspect of the MonadZero protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadZero</span> @@ -511,7 +511,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-06-30 21:25:57 CEST +Last updated 2014-06-30 21:28:33 CEST </div> </div> </body> From 277e8ae05147586e24f330e8bec1dde1f0446c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Tue, 1 Jul 2014 22:40:15 +0200 Subject: [PATCH 09/52] Update doc --- codox/cats.core.html | 81 +++++++++++++++++++++++--------------------- index.html | 37 +++++++++++++++++--- 2 files changed, 74 insertions(+), 44 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index 1f80b6f..0212ae7 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -3,10 +3,13 @@ </pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. - Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. </pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. + +Example: + (>>= (just 1) (comp just inc) (comp just inc)) + ;=> #<Just [3]> </pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant @@ -26,14 +29,14 @@ Otherwise, returns the instance unchanged. - (require '[cats.types :as t]) - (require '[cats.core :as m]) + (require '[cats.types :as t]) + (require '[cats.core :as m]) - (m/m-filter (partial < 2) (t/just 3)) - ;=> <Just [3]> + (m/m-filter (partial < 2) (t/just 3)) + ;=> <Just [3]> - (m/m-filter (partial < 4) (t/just 3)) - ;=> <Nothing> + (m/m-filter (partial < 4) (t/just 3)) + ;=> <Nothing> </pre></div></div><div class="public anchor" id="var-m-for"><h3>m-for</h3><div class="usage"><code>(m-for vs mf)</code></div><div class="doc"><pre class="plaintext">Same as m-map but with the arguments in reverse order. (require '[cats.types :as t]) @@ -51,49 +54,49 @@ </pre></div></div><div class="public anchor" id="var-m-lift"><h3>m-lift</h3><h4 class="type">macro</h4><div class="usage"><code>(m-lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a monadic context. - (require '[cats.types :as t]) - (require '[cats.core :as m]) + (require '[cats.types :as t]) + (require '[cats.core :as m]) - (def monad+ (m/m-lift 2 +)) + (def monad+ (m/m-lift 2 +)) - (monad+ (t/just 1) (t/just 2)) - ;=> <Just [3]> + (monad+ (t/just 1) (t/just 2)) + ;=> <Just [3]> - (monad+ (t/just 1) (t/nothing)) - ;=> <Nothing> + (monad+ (t/just 1) (t/nothing)) + ;=> <Nothing> - (monad+ [0 2 4] [1 2]) - ;=> [1 2 3 4 5 6] + (monad+ [0 2 4] [1 2]) + ;=> [1 2 3 4 5 6] </pre></div></div><div class="public anchor" id="var-m-map"><h3>m-map</h3><div class="usage"><code>(m-map mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a monadic context, map it into the given collection calling m-sequence on the results. - (require '[cats.types :as t]) - (require '[cats.core :as m]) + (require '[cats.types :as t]) + (require '[cats.core :as m]) - (m/m-map t/just [2 3]) - ;=> <Just [[2 3]]> + (m/m-map t/just [2 3]) + ;=> <Just [[2 3]]> - (m/m-map (fn [v] - (if (odd? v) - (t/just v) - (t/nothing))) - [1 2]) - ;=> <Nothing> - </pre></div></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect + (m/m-map (fn [v] + (if (odd? v) + (t/just v) + (t/nothing))) + [1 2]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context. - (require '[cats.types :as t]) - (require '[cats.core :as m]) + (require '[cats.types :as t]) + (require '[cats.core :as m]) - (m/m-sequence [(t/just 2) (t/just 3)]) - ;=> <Just [[2, 3]]> + (m/m-sequence [(t/just 2) (t/just 3)]) + ;=> <Just [[2, 3]]> - (m/m-sequence [(t/nothing) (t/just 3)]) - ;=> <Nothing> + (m/m-sequence [(t/nothing) (t/just 3)]) + ;=> <Nothing> </pre></div></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 @@ -106,12 +109,12 @@ wrapped computation and return Pair instance with result and new state. -(def computation (mlet [x (get-state) - y (put-state (inc x))] - (return y))) + (def computation (mlet [x (get-state) + y (put-state (inc x))] + (return y))) -(def initial-state 1) -(run-state computation initial-state) + (def initial-state 1) + (run-state computation initial-state) This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that applies specified function to state and return the old state.</pre></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 8f45a87..646045f 100644 --- a/index.html +++ b/index.html @@ -188,7 +188,7 @@ <h2 id="_abstractions_reference">Abstractions Reference</h2> <h3 id="_functor">Functor</h3> <div class="paragraph"><p>The Functor represents some sort of "computational context".</p></div> <div class="listingblock"> -<div class="title">This is aspect of Functor protocol</div> +<div class="title">Functor protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Functor</span> <span class="p">(</span><span class="nf">fmap</span> <span class="p">[</span><span class="nv">fv</span> <span class="nv">f</span><span class="p">]</span> <span class="s">"Applies function f to the value(s) inside</span> @@ -245,7 +245,7 @@ <h3 id="_functor">Functor</h3> <h3 id="_applicative_functor">Applicative Functor</h3> <div class="paragraph"><p>Represents an abstraction lying in between Functor and Monad in expressivity.</p></div> <div class="listingblock"> -<div class="title">Applicative protocol definition</div> +<div class="title">Applicative protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Applicative</span> <span class="p">(</span><span class="nf">fapply</span> <span class="p">[</span><span class="nv">af</span> <span class="nv">av</span><span class="p">]</span> <span class="s">"Applies the function(s) inside ag's context to the value(s)</span> @@ -295,7 +295,7 @@ <h3 id="_monad">Monad</h3> <div class="paragraph"><p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and put new value in a completely different context.</p></div> <div class="listingblock"> -<div class="title">This is the aspect of the Monad protocol</div> +<div class="title">Monad protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Monad</span> <span class="s">"Incomplete monad type definition."</span> <span class="p">(</span><span class="nf">bind</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">f</span><span class="p">]</span> <span class="s">"Applies the function f to the value(s) inside mv's context."</span><span class="p">))</span> @@ -337,7 +337,7 @@ <h3 id="_monad">Monad</h3> <h3 id="_monadzero">MonadZero</h3> <div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">MonadZero</a> protocol represents a monad that has a notion of an identity element.</p></div> <div class="listingblock"> -<div class="title">This is the aspect of the MonadZero protocol</div> +<div class="title">MonadZero protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadZero</span> <span class="s">"A `Monad` that supports the notion of an identity element."</span> <span class="p">(</span><span class="nf">mzero</span> <span class="p">[</span><span class="nv">ctx</span><span class="p">]</span> <span class="s">"The identity element for `ctx`."</span><span class="p">))</span> @@ -364,6 +364,33 @@ <h3 id="_monadzero">MonadZero</h3> <span class="c1">;; => #<Nothing ></span> </pre></div></div></div> </div> +<div class="sect2"> +<h3 id="_monadplus">MonadPlus</h3> +<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadPlus">MonadPlus</a> protocol represents a MonadZero wich has a plus operation.</p></div> +<div class="listingblock"> +<div class="title">MonadPlus protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadPlus</span> + <span class="s">"A `MonadZero` that supports the notion of addition."</span> + <span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">mv</span><span class="o">'</span><span class="p">]</span> <span class="s">"An associative addition operation."</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p><span class="monospaced">mplus</span> is an associative binary operation for which the value that <span class="monospaced">mzero</span> gives is the identity element. The <span class="monospaced">mplus</span> version contained in the core namespace is variadic.</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">just</span> <span class="nv">nothing</span><span class="p">]])</span> +<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">mplus</span><span class="p">]])</span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">]</span> <span class="p">[</span><span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span><span class="p">]</span> <span class="p">[</span><span class="mi">7</span> <span class="mi">8</span><span class="p">])</span> +<span class="c1">;; => [1 2 3 4 5 6 7 8]</span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">))</span> +<span class="c1">;; => #<Just [42]></span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">3</span><span class="p">))</span> +<span class="c1">;; => #<Just [42]></span> +</pre></div></div></div> +</div> </div> </div> <div class="sect1"> @@ -511,7 +538,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-06-30 21:28:33 CEST +Last updated 2014-07-01 22:38:59 CEST </div> </div> </body> From d8730b69dacb0b5ee232e381e0325bb22c4daec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Tue, 1 Jul 2014 22:49:25 +0200 Subject: [PATCH 10/52] Update doc --- index.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 646045f..ee38931 100644 --- a/index.html +++ b/index.html @@ -331,7 +331,14 @@ <h3 id="_monad">Monad</h3> <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> <span class="c1">;; => #<Just [3]></span> </pre></div></div></div> -<div class="paragraph"><p>TODO: document other more advanced options like <span class="monospaced">:let</span> and <span class="monospaced">:when</span> in a <span class="monospaced">mlet</span> context.</p></div> +<div class="paragraph"><p>If you want to use regular (non-monadic) let bindings inside a <span class="monospaced">mlet</span> block, you can do so using <span class="monospaced">:let</span> and a bindings vector as a pair inside the mlet bindings:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> + <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> + <span class="ss">:let</span> <span class="p">[</span><span class="nv">z</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">)]]</span> + <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> +<span class="c1">;; => #<Just [3]></span> +</pre></div></div></div> </div> <div class="sect2"> <h3 id="_monadzero">MonadZero</h3> @@ -538,7 +545,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-01 22:38:59 CEST +Last updated 2014-07-01 22:49:09 CEST </div> </div> </body> From a160e906960f482c3862d5b442813c01f68621d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Wed, 2 Jul 2014 18:14:37 +0000 Subject: [PATCH 11/52] Update doc --- index.html | 9 +- static/logo/LICENSE.original.txt | 322 +++++++++++++++++++++++++++++++ static/logo/LICENSE.txt | 1 + static/logo/logo.png | Bin 0 -> 5208 bytes static/logo/logo.svg | 81 ++++++++ static/logo/original.svg | 124 ++++++++++++ 6 files changed, 536 insertions(+), 1 deletion(-) create mode 100644 static/logo/LICENSE.original.txt create mode 100644 static/logo/LICENSE.txt create mode 100644 static/logo/logo.png create mode 100644 static/logo/logo.svg create mode 100644 static/logo/original.svg diff --git a/index.html b/index.html index ee38931..90a8702 100644 --- a/index.html +++ b/index.html @@ -28,6 +28,13 @@ <h1>Category Theory abstractions for Clojure</h1> </div> </div> <div id="content"> +<div id="preamble"> +<div class="sectionbody"> +<div class="paragraph"><p><span class="image"> +<img src="static/logo/logo.png" alt="cats logo"> +</span></p></div> +</div> +</div> <div class="sect1"> <h2 id="_introduction">Introduction</h2> <div class="sectionbody"> @@ -545,7 +552,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-01 22:49:09 CEST +Last updated 2014-07-02 18:14:21 UTC </div> </div> </body> diff --git a/static/logo/LICENSE.original.txt b/static/logo/LICENSE.original.txt new file mode 100644 index 0000000..7cb547c --- /dev/null +++ b/static/logo/LICENSE.original.txt @@ -0,0 +1,322 @@ +Original Icon made by Freepik.com from http://www.flaticon.com/free-icon/maneki-neko_13166 +(CC BY 3.0) + +Creative Commons Legal Code + +Attribution 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR + DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS +AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE +TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY +BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. + +1. Definitions + + a. "Adaptation" means a work based upon the Work, or upon the Work and + other pre-existing works, such as a translation, adaptation, + derivative work, arrangement of music or other alterations of a + literary or artistic work, or phonogram or performance and includes + cinematographic adaptations or any other form in which the Work may be + recast, transformed, or adapted including in any form recognizably + derived from the original, except that a work that constitutes a + Collection will not be considered an Adaptation for the purpose of + this License. For the avoidance of doubt, where the Work is a musical + work, performance or phonogram, the synchronization of the Work in + timed-relation with a moving image ("synching") will be considered an + Adaptation for the purpose of this License. + b. "Collection" means a collection of literary or artistic works, such as + encyclopedias and anthologies, or performances, phonograms or + broadcasts, or other works or subject matter other than works listed + in Section 1(f) below, which, by reason of the selection and + arrangement of their contents, constitute intellectual creations, in + which the Work is included in its entirety in unmodified form along + with one or more other contributions, each constituting separate and + independent works in themselves, which together are assembled into a + collective whole. A work that constitutes a Collection will not be + considered an Adaptation (as defined above) for the purposes of this + License. + c. "Distribute" means to make available to the public the original and + copies of the Work or Adaptation, as appropriate, through sale or + other transfer of ownership. + d. "Licensor" means the individual, individuals, entity or entities that + offer(s) the Work under the terms of this License. + e. "Original Author" means, in the case of a literary or artistic work, + the individual, individuals, entity or entities who created the Work + or if no individual or entity can be identified, the publisher; and in + addition (i) in the case of a performance the actors, singers, + musicians, dancers, and other persons who act, sing, deliver, declaim, + play in, interpret or otherwise perform literary or artistic works or + expressions of folklore; (ii) in the case of a phonogram the producer + being the person or legal entity who first fixes the sounds of a + performance or other sounds; and, (iii) in the case of broadcasts, the + organization that transmits the broadcast. + f. "Work" means the literary and/or artistic work offered under the terms + of this License including without limitation any production in the + literary, scientific and artistic domain, whatever may be the mode or + form of its expression including digital form, such as a book, + pamphlet and other writing; a lecture, address, sermon or other work + of the same nature; a dramatic or dramatico-musical work; a + choreographic work or entertainment in dumb show; a musical + composition with or without words; a cinematographic work to which are + assimilated works expressed by a process analogous to cinematography; + a work of drawing, painting, architecture, sculpture, engraving or + lithography; a photographic work to which are assimilated works + expressed by a process analogous to photography; a work of applied + art; an illustration, map, plan, sketch or three-dimensional work + relative to geography, topography, architecture or science; a + performance; a broadcast; a phonogram; a compilation of data to the + extent it is protected as a copyrightable work; or a work performed by + a variety or circus performer to the extent it is not otherwise + considered a literary or artistic work. + g. "You" means an individual or entity exercising rights under this + License who has not previously violated the terms of this License with + respect to the Work, or who has received express permission from the + Licensor to exercise rights under this License despite a previous + violation. + h. "Publicly Perform" means to perform public recitations of the Work and + to communicate to the public those public recitations, by any means or + process, including by wire or wireless means or public digital + performances; to make available to the public Works in such a way that + members of the public may access these Works from a place and at a + place individually chosen by them; to perform the Work to the public + by any means or process and the communication to the public of the + performances of the Work, including by public digital performance; to + broadcast and rebroadcast the Work by any means including signs, + sounds or images. + i. "Reproduce" means to make copies of the Work by any means including + without limitation by sound or visual recordings and the right of + fixation and reproducing fixations of the Work, including storage of a + protected performance or phonogram in digital form or other electronic + medium. + +2. Fair Dealing Rights. Nothing in this License is intended to reduce, +limit, or restrict any uses free from copyright or rights arising from +limitations or exceptions that are provided for in connection with the +copyright protection under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, +Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +perpetual (for the duration of the applicable copyright) license to +exercise the rights in the Work as stated below: + + a. to Reproduce the Work, to incorporate the Work into one or more + Collections, and to Reproduce the Work as incorporated in the + Collections; + b. to create and Reproduce Adaptations provided that any such Adaptation, + including any translation in any medium, takes reasonable steps to + clearly label, demarcate or otherwise identify that changes were made + to the original Work. For example, a translation could be marked "The + original work was translated from English to Spanish," or a + modification could indicate "The original work has been modified."; + c. to Distribute and Publicly Perform the Work including as incorporated + in Collections; and, + d. to Distribute and Publicly Perform Adaptations. + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor + reserves the exclusive right to collect such royalties for any + exercise by You of the rights granted under this License; + ii. Waivable Compulsory License Schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor waives the + exclusive right to collect such royalties for any exercise by You + of the rights granted under this License; and, + iii. Voluntary License Schemes. The Licensor waives the right to + collect royalties, whether individually or, in the event that the + Licensor is a member of a collecting society that administers + voluntary licensing schemes, via that society, from any exercise + by You of the rights granted under this License. + +The above rights may be exercised in all media and formats whether now +known or hereafter devised. The above rights include the right to make +such modifications as are technically necessary to exercise the rights in +other media and formats. Subject to Section 8(f), all rights not expressly +granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made +subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms + of this License. You must include a copy of, or the Uniform Resource + Identifier (URI) for, this License with every copy of the Work You + Distribute or Publicly Perform. You may not offer or impose any terms + on the Work that restrict the terms of this License or the ability of + the recipient of the Work to exercise the rights granted to that + recipient under the terms of the License. You may not sublicense the + Work. You must keep intact all notices that refer to this License and + to the disclaimer of warranties with every copy of the Work You + Distribute or Publicly Perform. When You Distribute or Publicly + Perform the Work, You may not impose any effective technological + measures on the Work that restrict the ability of a recipient of the + Work from You to exercise the rights granted to that recipient under + the terms of the License. This Section 4(a) applies to the Work as + incorporated in a Collection, but this does not require the Collection + apart from the Work itself to be made subject to the terms of this + License. If You create a Collection, upon notice from any Licensor You + must, to the extent practicable, remove from the Collection any credit + as required by Section 4(b), as requested. If You create an + Adaptation, upon notice from any Licensor You must, to the extent + practicable, remove from the Adaptation any credit as required by + Section 4(b), as requested. + b. If You Distribute, or Publicly Perform the Work or any Adaptations or + Collections, You must, unless a request has been made pursuant to + Section 4(a), keep intact all copyright notices for the Work and + provide, reasonable to the medium or means You are utilizing: (i) the + name of the Original Author (or pseudonym, if applicable) if supplied, + and/or if the Original Author and/or Licensor designate another party + or parties (e.g., a sponsor institute, publishing entity, journal) for + attribution ("Attribution Parties") in Licensor's copyright notice, + terms of service or by other reasonable means, the name of such party + or parties; (ii) the title of the Work if supplied; (iii) to the + extent reasonably practicable, the URI, if any, that Licensor + specifies to be associated with the Work, unless such URI does not + refer to the copyright notice or licensing information for the Work; + and (iv) , consistent with Section 3(b), in the case of an Adaptation, + a credit identifying the use of the Work in the Adaptation (e.g., + "French translation of the Work by Original Author," or "Screenplay + based on original Work by Original Author"). The credit required by + this Section 4 (b) may be implemented in any reasonable manner; + provided, however, that in the case of a Adaptation or Collection, at + a minimum such credit will appear, if a credit for all contributing + authors of the Adaptation or Collection appears, then as part of these + credits and in a manner at least as prominent as the credits for the + other contributing authors. For the avoidance of doubt, You may only + use the credit required by this Section for the purpose of attribution + in the manner set out above and, by exercising Your rights under this + License, You may not implicitly or explicitly assert or imply any + connection with, sponsorship or endorsement by the Original Author, + Licensor and/or Attribution Parties, as appropriate, of You or Your + use of the Work, without the separate, express prior written + permission of the Original Author, Licensor and/or Attribution + Parties. + c. Except as otherwise agreed in writing by the Licensor or as may be + otherwise permitted by applicable law, if You Reproduce, Distribute or + Publicly Perform the Work either by itself or as part of any + Adaptations or Collections, You must not distort, mutilate, modify or + take other derogatory action in relation to the Work which would be + prejudicial to the Original Author's honor or reputation. Licensor + agrees that in those jurisdictions (e.g. Japan), in which any exercise + of the right granted in Section 3(b) of this License (the right to + make Adaptations) would be deemed to be a distortion, mutilation, + modification or other derogatory action prejudicial to the Original + Author's honor and reputation, the Licensor will waive or not assert, + as appropriate, this Section, to the fullest extent permitted by the + applicable national law, to enable You to reasonably exercise Your + right under Section 3(b) of this License (right to make Adaptations) + but not otherwise. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR +OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY +KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, +INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF +LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, +WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION +OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE +LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR +ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES +ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate + automatically upon any breach by You of the terms of this License. + Individuals or entities who have received Adaptations or Collections + from You under this License, however, will not have their licenses + terminated provided such individuals or entities remain in full + compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will + survive any termination of this License. + b. Subject to the above terms and conditions, the license granted here is + perpetual (for the duration of the applicable copyright in the Work). + Notwithstanding the above, Licensor reserves the right to release the + Work under different license terms or to stop distributing the Work at + any time; provided, however that any such election will not serve to + withdraw this License (or any other license that has been, or is + required to be, granted under the terms of this License), and this + License will continue in full force and effect unless terminated as + stated above. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, + the Licensor offers to the recipient a license to the Work on the same + terms and conditions as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor + offers to the recipient a license to the original Work on the same + terms and conditions as the license granted to You under this License. + c. If any provision of this License is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this License, and without further action + by the parties to this agreement, such provision shall be reformed to + the minimum extent necessary to make such provision valid and + enforceable. + d. No term or provision of this License shall be deemed waived and no + breach consented to unless such waiver or consent shall be in writing + and signed by the party to be charged with such waiver or consent. + e. This License constitutes the entire agreement between the parties with + respect to the Work licensed here. There are no understandings, + agreements or representations with respect to the Work not specified + here. Licensor shall not be bound by any additional provisions that + may appear in any communication from You. This License may not be + modified without the mutual written agreement of the Licensor and You. + f. The rights granted under, and the subject matter referenced, in this + License were drafted utilizing the terminology of the Berne Convention + for the Protection of Literary and Artistic Works (as amended on + September 28, 1979), the Rome Convention of 1961, the WIPO Copyright + Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 + and the Universal Copyright Convention (as revised on July 24, 1971). + These rights and subject matter take effect in the relevant + jurisdiction in which the License terms are sought to be enforced + according to the corresponding provisions of the implementation of + those treaty provisions in the applicable national law. If the + standard suite of rights granted under applicable copyright law + includes additional rights not granted under this License, such + additional rights are deemed to be included in the License; this + License is not intended to restrict the license of any rights under + applicable law. + + +Creative Commons Notice + + Creative Commons is not a party to this License, and makes no warranty + whatsoever in connection with the Work. Creative Commons will not be + liable to You or any party on any legal theory for any damages + whatsoever, including without limitation any general, special, + incidental or consequential damages arising in connection to this + license. Notwithstanding the foregoing two (2) sentences, if Creative + Commons has expressly identified itself as the Licensor hereunder, it + shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the + Work is licensed under the CCPL, Creative Commons does not authorize + the use by either party of the trademark "Creative Commons" or any + related trademark or logo of Creative Commons without the prior + written consent of Creative Commons. Any permitted use will be in + compliance with Creative Commons' then-current trademark usage + guidelines, as may be published on its website or otherwise made + available upon request from time to time. For the avoidance of doubt, + this trademark restriction does not form part of this License. + + Creative Commons may be contacted at http://creativecommons.org/. diff --git a/static/logo/LICENSE.txt b/static/logo/LICENSE.txt new file mode 100644 index 0000000..96074b8 --- /dev/null +++ b/static/logo/LICENSE.txt @@ -0,0 +1 @@ +The adaptation of icon is made by Andrey Antukh and Alejandro Gómez with same license as the original. diff --git a/static/logo/logo.png b/static/logo/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9f1a8f949faea6d5a7768f1aa02b68a648f87979 GIT binary patch literal 5208 zcmV-e6sPNnP)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00004b3#c}2nYxW zd<bNS00009a7bBm000}W000}W0bUxB8~^|S8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H16V*vXK~#90?VWj?71fo;zlT+2iyH`tw8j{hpg0;gL{MVJjJufV zd_Y4qL1UuHn9R6FjWL=;qZ311Mx&z>HIul6pdUnn8r0~3F}NTqk!Euth=PcUG~D^) z+-Kh|>b+N0_tvXwyMLe0`E>QGyWdlHIrrRi#27;-Ixe~tU4Tv$i%tgU;OJz44vtO+ z=-}vNfDVp!&j2FQwZObZMA~&5w#&kcNEZ>AC?b=Aw?$-yh}<tCdp0Ql5h5}TcpF$Q zB6o?%*hb_X9LAV-ML=I*3SeUBBj947YfgFh1g-(rSIPfIpnK76l&Vfe7a(N^GyyMG zX?&L+2eu2G_h*4Q3G$u^Y*BPuec~7Z*aY}nf)1$A+rR|h(E#WUd=q#tMcxkrQgoYr z(iq^zn1-GLoC|!}etB`7F(3F^+M(Gp+_!<nRnmO`7z<noOpAGcLD6mYiD3X>T%>V7 z1Wt|#_Z7Pii0iO-fZthW*b&$?61NwyGjKXE8CYE<oz=h>WAgqMu+9nB0*orU?b<y9 z0Gk6VBb{(ejqu-1F;uSv769+2h%>%M-V-8W7XdwsZo~G@09Qok*9389r0CEzba$P6 z1$Z(N=etF>VJ#}P96&?{0B1QrwE+KCCr(#%xX%MCL`15+G|C0vK|8*J^F*X~PUZ1O z(HvOki@KJ!U(>Z!!gU1>0Db~2C7-XqLJNRPfW4@)(g$vj#JRBOwyfI5MHiq(=WmNH z_S}Zt%Xz;Qx;VT8Sdnw5SEDz8TY=+&eoooOM8d5EHZQtO<EUHRA)+`;L?v%7Mu^Br z;5c9e#f!4HK^J}#fEE#X1h^O2G7|2!Xhabif{t3ffj+=yz%#(3#+VQDD{=%yb6}OP zzZ>v6#eCJFX(2E;GO}F<tgRA$4RAloR9$j!>!Lfm3IiNhf{qJ8%Ye@~_4*+jPiwVk z7BIXcGQdM6=)4d##;H>p`GiX?z?I~6z*Tf-$8`RVz=jfZo-e)R)agj7pCBfs*d35B z6}^ax!$ee|(%x}1fQWQM&oO-4`b-fytA4O_5X+&ZfQa-&_wid5T^3KQLl=I_MdUc( zo<QktK*iuw0;N~F5nwFszw-eeH^wZt&!+`Uw+nEWi0l|L!7}0Wq6-iRA2`qZ1x~vc zaDJ%7O2YsmvMVq$L)1T`+r}Zl0ALV$jz1?{=>T{P_$tsJ6##7qoCN$eCagQJ=F!IE ztsu!CMX&mum2y<>pM*|u;`czMYTcdR&d!i#l-2<!*2(9bNSr@9@7@nkhTL`qr5OQ$ z6EeivTtr5R$Q`K4)@opxh)fcZt&K5P<2MJl0ADf2{8mJoMC2Cqq;WOyu87<uBKx9> zsxI7iUF?y6Eqq->`g^BR^p|hHl3fY^h0Fs6qn(lUuxOrBzSmO3TZ29PL65WZ7y%4$ z&L?FA7@b3!I|DCZwRE$lAtEz?+34CLDK-O6wa>SrBSs!L&^v{qzkd6b{Eqy-lA@>? zE4~FT$SIGveA~Vhf*=uDhOVv~jb*@ebY4FIRq_al<Bc)*0Eoz~=m}qF>|~6YpE-63 zzWy}x|C_)K=+-a9aq)gmIl2IIJ<?hXJPiB_WhjHLJ$AF{cSG+BgdPPp(vEI#Yk=KT zgdKn?Tbyf*8HAp#p9s8^G4Invq@UIEI|^Mlq`@3idby1;W;@_gU?}h@`+f`HArWaZ z#<bY54`wWDHSFXSy96UZMTs)Y7uO6d<Z#uLHmIh`-F1qn0jWGce2<32yN$vrGTw z)Ba^p39B{tuLYh(_3PiVv>N@wwz9M%dUqh}HSycf!<y63YhY>6f^H8NIOSUf^mEF$ z127DDQbZ;gW9|k{5s@XpMH$QN!fWkRb_Q4myn=o~)fiv{x<$)!h_n>A3K)o<L;N~r z{I_iR{!VoUXtC*U1N>e@{@oaJl`-aG5m^dcPj==7-^FtYrhq>Zeqoe^K0sIgBY~$; z9fT_zl=oRq{SPPI#nULg;?@2oV1TDmR(LLOIdBFlKAxVT(Wat9a}zqf7~lu!mv~;v z4!O^k<6FSb&=Da?yopX5jG?-cXgzwly)!_y+qY4A2{;s8^&SLVhTi;5(^yMT9sa(+ zDQtY_@E-J3aS-sE6zRTz-V#0lU6UMvPFuC&YyiIMw8M#HQ-yo3-7)|=>{h$Yn+Ls# z8kne;XEQplx8z)&^|U={{9cAMX8H6%p>hDDwZ6T9Sq=bpq5f*W3HUUAi?bvUVE@Y9 zL1WC%QDIUVto12Cp$uRJFjt`p9d8v`mI5#n*ax^1cveIz2Ue${cL$Qf?-o%3!~P(k zzkU8RI^1rJ?&W_$W2b~7=w;w&TmL3>t80Keoi;i*MSAzQn>7F`YF!EpwErJ(EAgE3 z+fZN<x=ky(vqI8xbf?hGVg3b?Fr)0dZm0k(NxC&{7L<kofZ@PDfaT6_KXNLv0NB-e zw+*_js%EOCz0e2fwe`ME-G-qzi=$y5aKaptF#S79&j7%lw4RVX=KOwFq%!XkG5>-d zs9b_t{VKXM(@--i>Kz=Z&;B*)vH|#<6ZX*r`CMOW2CyBt&?)fk&b$As(g>FjF}{Fa zq5co*@2`ub4^gK6LbUw04u?`-$n@V%_>l?n{6T3M0NrIwjTHEY&ih&?d4B-<R7rO@ zdeb)PJefB=i|YPWH4q7$OfqTTN3^|8Uhkspsbyw>i(?8r!TF-=HO4$(WSu;=N9_j9 z#Qy?jQffg(*q7p1EvZtzT}f}W>Pjd60d>NDsgw)={BxBK8D-z^k)lEV2UWVLm*>{N zc=W8`Zgh7MLN9+csu+4Bx^t;(?gbS$|D3kA1C!D!+M1mCYmKmb`1DgQI)Ngx9cu0* zYAOZPhVK#)ITkgik`(WvYlB}J)vife7C|+Kc5<jc`W3gJ9Ta_DhYF_Vq1U{Zq$npM zauT|O*(OcA2+lFa{LH2|5oNwOY-NmDkvW$fzWg4jWs5j&{RnIJgluwe13V8LOHKw8 zJnFp#s@?QL#(G8RHK2!0yEpO1EEjl}JBNn2u12NiJK-jIHqcUZjWIZM9a7X)(4*YD zNN4&bDSge!>xP*3x0Q+kfG^dl(Bn?ns0<)0twX1hL$Ok}6y+TP9EO!bCXCY^U6@@A zyqZI&yEK<p8xDKMy#IP>7yz}dU9Ul=JK-ni&|vQaPoQTC<5AIb+<ts?Oj+jvpN|RK z1Kp2bh$^3~$+^>`bc9ou=+yezGBLoV2`b~>n*CFQ8gLbGiIeXHs;|sH0FHFRUQT|u zdy~>kr#z=Rzb^~XZ$XZOMdUN6l&&6J!wH*($U6c0qMASz+r!sVT^V*0;3g5N-1c1t zY?^xsYh$Fnfei3lbTJ6(6~!B&^Z|aw##TM!;GSLg3Y2#e%&>pQp#rE{7=Z5e0UpV% zMCtH70AtJ=R8<YsV1+ll89+o%Ko?+1P{atZ&=|AOJ`YP6rxNaY^x&pw94#W7+vkev z`pggsdoh5B^Z~9;5yfSIMvVaO7oSvMQVG|M#xZIw^g!L>V2pVNxX=FehVKY)7U}NI z7r_8qipci%c~-(Wm2jU!*9B$3IOjQ-kHX9hAR?R4)|o@1XwLJ7ta)cZ#ZuS3sOPa- zcm&<<x$(+?kygZxv0H*5@Ywc!lk{7fTb%ew{Qrfbxme#l=vUobCESa^P#dlfZS@$+ zK<9?qwtL9|P<81nQn0B`8hQEksYX9>^6rgZEO`P|Q=5t24C?8Gi4(mRP0yEw0ltv2 z0&|=+?r3o1wV+d0O^1#sbDvLn4OV*{|ArC-9i1`WK<D|zjA>*=S5!niqnfEzYpn8d z;K!8LVD-5AL6RerK7fcULM>%x!BAt&Vi7qAHT6;ymZCZf^U*Vdf1)jemK96UHVm_f z&M^EB$8QKb*`~7z*>A*lbQ)3Q6mW2cI4(v57<G&^+cT|>iZP)Q%EABxJo9uJ==Yv! zbyOS@DxoY4;A_vnNkm52=Q~g}u|{J(s&X|8Ra<`=y{Xek;gk>d6Ok~dlo{3lArv`o zb<(>#Kzd2&CE%y1zrk32LR8!55OlZD+@Nx0r7>yyE{Gfe_)CDozXxn$)BBg48)`0a zc!qikYPBPJfwL_1<DwYg=|B}Y+@{x+e4IpnfQqZTq6bf3L<K>+rL1oc^tyHy{r)`Z z$)XtG)<6}w(MdDvY}uDy$LjZ?%9PEK_j5_9O^i+rMfoU>qjgldI+r&CoEfMBuhA-q zni#NQUaE91x?qhOf~wHNq;$=S-sxWysGK1v_0$%nEW3apiU_D4LB%@v6M@ov2UY5< zIBUKL-RazfP64|D-$w;d2cxcD62lntDr!@BO`!7n!hbuMVFc(!xJ#JF*)#_QNNXK% zNTjTbfWu<yFb3W7tp+yD&<4j)j>DqAHGB%N4G_w@=iWBGApz2w6vL?VYt&(yjdyIu zHn_6{46qhY593)GV4px0s2GbH;hD}VVCzU3ds5@#1o{;l9OFzW+h7OEah9>I4+CU6 z4mQTj!r#8%Tw}~X?6dD&c9m)M)CqtwX00*i<r;COpeJibSoOA4FvcuE*A_*i$tSXp zQs{S3m8q;a13q@He4<A>p!Ne&!5Fh1?Z7^$ErTp*q>;;NX!41inE{M3D^W|=D>FpD z-568RYd;%ZooB^!rd97hEf(3oU(OhRHoBcH5=~yQy;qSs7gn<e5J&f5tzV!v0evr9 zW)g{_SH>z5$W=J{fGN|dbsfGDbaTVk050rYI0Cq)PSCZ$nZ}s0#+X(1w@LV4yqK3U z-j8V20P2g%2^yJyC^UJ+_Wb&zrrdT%1ugfZQ^N}Td>*ii6Rr>8#J>k;DEFRhYzaKm zmxN9qMUDV}_v%AW2G|}oW424oyDm`%vA^#}Si=fCr7Uw7HnvZ=0-X+OY7AFNFNrO` zJjqKI;5!8fdNK4l5xH7KK31wU#%wT^VM3&<hzu8z%g|e`J9y^nVtvZ+6Hz%v1^<hB z@fwIKhUT4rX!Ic6^}M$5907J@V~$*kDvewOT!CJ-^6`mNj}A&v-u|?jtTpHYbO@@a zXn>0|w87XM>z0)E&)SE+Uc=%>kinLY@=QA^2B!#n6|GJk0j@A=vhEFZCvXI6fiw+# zOu>ah=6>{@0?OcdG?C{_5g84f<owi(G6Y8L4n73zB_e4U3Um}K8kwh|PXYrRUN3-% zbVv8=F3vWpnqI*J=$htVQ|8~Ok**dxGz07{BJ~zQ-$#7~RWRKc^M^>7spt{!_@o(& z$nJz)&}K!4W`K(FX8cQ$CiLcS1uf_~MjIGCn0gA>Lqra&lGffL;*JnO@9B9UvFY56 z;JFLfh2mGh1~oh1w@MkOM8aNEqdwoTVV)&MbsXK@TwtFE(s-MJ)hP3kurCAjpgc~V zu81k$F_AFKaIA30gzrnMUBIcd>K67v9Zi1h=MOdBTy&icj{W6^Gk|S~IVETWgQ|h= z<&>)z8+#?K>s$fd8C1e=KyMFM99X@Eo?RS7dDO&T_3FO>3~*Zs8lgf<uzm$lbM5ZC z*(CT<&^`5oF=?+s?IJW$+tW#-X@*b#g>WA~2X%*125bx5CnATVf*n_=bFWEor{1Vc z;4l#x1{?|Oi#mk91vMx0F#h)=Lt>#<>;NOc!4&@$MCk=!d*8Z6>bV>FTL;fVrx!g1 zY*B(nh@<6r`qOdhcp~u*8_GaC6v_a$fs(p_FM|F=9mh^J>NN_L4HR96YUH&5G$za% z0Ca&h#3TNCbS?21`laoR-Wu-hUo^%5vqj|3z<sEh)v7*#tO2QGQHR!{3`MR))#l!` z)C)KewMpzFOnb<;U_qQlWpDsh3ooFCBYuNw?u<oO-=C@#DJ2%61|i-=kB7HJPxS_& z3&{{z1>B4ZqMkrKnw^eLCy5TQ65tqP%w(?=0!;zki1&r-L+@aH=AZ(a%V{4DrPreR zkz3lb_aYz16AMY{A}6;sfUW4|IW_1sTFti(LFEo*xR)14Q3u!ulHbnZ+d=v*AOmbi zeqZQnU|%P%qbSF<ESLU*b3F|`rq08Ym_g+csV}wW$^f>~m*v>Ni?PFM37Oy-tjQZ& zwtaIh+Xcb;EHDG~LUjW3s`!IA;@pxj!8<rYCv-u%B**-k31Ar{7Y48mFfQi?KPQsk z`2{n;*hqP<&oQqS;DDh06`BETBm6qYMp%NQzmIMYR~OXzb0YQbn{!z%3f@;aF+fl9 zm7tA`<oAn$7+_qa9H-=%*JI@1FF6;LE@RAERFd{)9_gc!Iv4**<1c8ujb18ou}@sU z0C*8N!RVFtpvX<9&lvMMDobz9A^A29ZH#HA)z43(Fx_nI#y*sU&&5;di1&I9X$LzC zh=noc6%pAVy&$@Gz@+2O^{+!moPOxK!2R2gFm*Mk1nx!Dcw~}t`CuBl$jr?uS&*}U zx|xXdLM3=U?#`B=#;GO)j~ZjvWhg@&bM!_9HfyR7=t$WGc*_{`evLeOqK8jMqsk;% z9Z;-C4RW55ww`Ix5C-@-Gj+-G4OEGw)=5|kdRuo9s(~}v7*o&PTd5!-0(>52hS8{` zbRcTFHV%~&(HX!Ec3R6F4P}5f8LNZlp{U@bqGGiK6(qf3Lb*gK5k#abdg3?)J#}nB zucog+UEIFc@G=#}0G%iY%5bx%69uA^0XjH38K8rslL0z7IvJpYqmuzTIQ}1U+}%<$ S1(h=Z0000<MNUMnLSTX;hnoig literal 0 HcmV?d00001 diff --git a/static/logo/logo.svg b/static/logo/logo.svg new file mode 100644 index 0000000..58dddea --- /dev/null +++ b/static/logo/logo.svg @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Capa_1" + x="0px" + y="0px" + width="64px" + height="64px" + viewBox="0 0 64 64" + enable-background="new 0 0 64 64" + xml:space="preserve" + inkscape:version="0.48.5 r10040" + sodipodi:docname="maneki.svg"><metadata + id="metadata3071"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs3069" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1918" + inkscape:window-height="1064" + id="namedview3067" + showgrid="false" + inkscape:zoom="7.660845" + inkscape:cx="44.814801" + inkscape:cy="23.685754" + inkscape:window-x="0" + inkscape:window-y="14" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /><g + id="g3049" /><g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="Cat" + style="display:inline"><path + inkscape:connector-curvature="0" + d="m 49.551334,23.074752 c -0.260285,-0.411908 -0.528152,-0.817499 -0.818763,-1.205401 -0.116244,0.141515 -0.238806,0.291874 -0.386638,0.464977 -0.174366,0.203427 -0.366421,0.42707 -0.574903,0.672194 -3.014766,3.521439 -7.401719,5.201925 -11.818996,6.07502 -0.109927,0.02148 -0.22238,0.03411 -0.33357,0.0518 0.281765,0.53447 0.456132,1.132117 0.456132,1.776514 0,2.117665 -1.722183,3.839847 -3.839848,3.839847 -2.117664,0 -3.839847,-1.722182 -3.839847,-3.839847 0,-0.644397 0.174367,-1.243307 0.457396,-1.777777 -0.11119,-0.01895 -0.223644,-0.03032 -0.33357,-0.0518 C 24.388269,28.636781 20.461239,26.496373 17.450263,23.70146 17.177342,23.448755 16.92211,23.211213 16.687095,22.992623 16.481141,22.75129 16.292876,22.530174 16.1223,22.330537 c -0.03538,-0.0417 -0.05938,-0.07202 -0.0935,-0.112454 -0.08592,0.590066 -0.24765,1.214246 -0.296927,1.555398 -0.401801,2.748163 -0.827608,5.515278 -0.712628,8.301347 0.05307,1.300166 0.216063,2.605385 0.63808,3.841111 0.113717,0.332306 0.242596,0.659559 0.374003,0.986811 0.392955,0.974177 0.812445,1.940772 0.921108,2.997078 0.317144,3.108267 -2.403221,5.891808 -5.483691,5.891808 -1.300165,0 -2.5080931,-0.531943 -3.5315469,-1.339334 -0.5028823,5.827369 0.657032,11.410878 5.3257499,14.920946 0.0025,0 1.297638,0.82129 3.789306,0.82129 1.776514,0 3.723603,-0.429598 5.78441,-1.235726 0.411908,-0.160467 -0.422017,-2.401958 -0.543315,-2.644554 -0.633025,-1.247098 -1.79673,-2.324883 -3.094369,-2.860617 -0.262813,-0.108663 -0.510463,-0.209745 -0.739161,-0.305772 -0.228698,-0.113717 -0.458659,-0.127616 -0.655768,-0.178157 -0.200901,-0.0417 -0.37653,-0.07834 -0.520572,-0.109927 -0.293137,-0.06065 -0.459922,-0.09603 -0.459922,-0.09603 0,0 0.169312,-0.0051 0.46624,-0.01264 0.150359,-0.0038 0.33357,-0.0088 0.543315,-0.0139 0.209745,0.0051 0.456132,-0.03664 0.708836,0.02401 2.907367,0.689883 5.838741,2.24149 6.579166,5.401561 0.04675,0.200901 0.08718,0.377794 0.121298,0.523099 0.01011,0.04296 0.0139,0.06191 0.02274,0.09729 1.896549,0.165522 5.184236,0.424544 6.967067,0.424544 1.202875,0 2.405749,-0.08087 3.604832,-0.162994 0.760641,-0.05181 2.519466,0.18321 3.168916,-0.238806 0.370213,-0.241333 0.338625,-0.7101 0.481403,-1.137171 0.319671,-0.959014 0.875621,-1.871278 1.571823,-2.605385 1.429045,-1.499802 3.505013,-2.377951 5.572137,-2.326146 0.209745,0.0051 0.391692,0.01011 0.543315,0.0139 0.295665,0.0076 0.46624,0.01264 0.46624,0.01264 0,0 -0.168048,0.03538 -0.459922,0.09603 -0.144042,0.03032 -0.319672,0.06823 -0.520572,0.109927 -0.197109,0.0518 -0.427071,0.06444 -0.655768,0.178157 -0.229962,0.09603 -0.478876,0.197109 -0.740425,0.305772 -0.266603,0.08718 -0.518044,0.247651 -0.768222,0.41949 -0.247651,0.17563 -0.526889,0.310827 -0.759378,0.521835 -0.224907,0.213536 -0.449814,0.430862 -0.678511,0.648188 -0.228698,0.207217 -0.367686,0.496564 -0.55216,0.727789 l -0.252705,0.35505 -0.166785,0.392956 c -0.09855,0.256495 -0.240069,0.494037 -0.291874,0.717681 -0.03411,0.224907 -0.07202,0.42328 -0.11119,0.6027 -0.02274,0.08845 -0.0417,0.17184 -0.06191,0.251442 0,0.116244 0,0.227434 0.0025,0.331043 0,0.207217 0,0.387901 0.0025,0.536997 2.060806,0.806128 4.007895,1.235726 5.784409,1.235726 2.508094,0 3.805732,-0.833926 3.817104,-0.844034 11.451311,-8.600802 1.7285,-29.730701 -1.676696,-36.275752 z M 32.230958,53.205991 c -4.510778,0 -8.18005,-3.668008 -8.18005,-8.18005 0,-4.509514 3.670535,-8.180049 8.18005,-8.180049 4.509514,0 8.180049,3.669271 8.180049,8.180049 0,4.512042 -3.670535,8.18005 -8.180049,8.18005 z" + id="path3051" /><path + inkscape:connector-curvature="0" + d="m 16.45208,21.959061 c 0.216062,0.149096 0.456132,0.313354 0.717681,0.492774 0.270394,0.152887 0.562268,0.318408 0.874358,0.495301 5.209506,2.954118 10.980017,4.418541 16.980489,3.799415 1.723445,-0.178157 3.434256,-0.549633 5.08189,-1.087894 2.798704,-0.913527 5.459684,-2.048171 7.904602,-3.703386 0.189528,-0.12888 0.35505,-0.238806 0.510463,-0.341152 -0.707573,-0.902155 -1.485903,-1.747452 -2.415856,-2.481559 -0.86425,-0.681039 -1.748717,-1.341862 -2.394377,-2.244018 -1.782831,-2.491667 -0.972913,-6.086391 1.435362,-7.8490061 -0.02274,-0.04928 -0.04296,-0.09729 -0.0657,-0.146569 -1.545289,-3.432992 -3.41783,-5.431886 -5.051566,-5.431886 -0.630498,0 -1.274895,0.2855563 -1.915501,0.8478241 -1.666587,1.4618959 -3.757718,2.2680239 -5.884228,2.2680239 -2.126509,0 -4.216377,-0.806128 -5.882964,-2.2680239 -0.640609,-0.5622678 -1.285006,-0.8478241 -1.915504,-0.8478241 -1.657742,0 -3.486061,1.948353 -5.014924,5.344703 -1.743662,3.8764901 -3.348336,7.4459431 -3.348336,11.9832551 0,0.104872 -0.03159,0.20469 -0.08087,0.296928 0.06823,0.160467 0.09097,0.371475 0.08213,0.616599 0.123826,0.08213 0.24007,0.160467 0.382848,0.256495 z m 7.507855,-1.460633 c -0.290611,0.137724 -0.68483,0.289347 -1.094211,0.371476 -0.406855,0.08971 -0.828872,0.11119 -1.15107,0.101082 -0.322198,-0.01011 -0.547106,-0.06697 -0.547106,-0.06697 0,0 0.183211,-0.142778 0.473822,-0.281765 0.29061,-0.138988 0.684829,-0.289347 1.094211,-0.371476 0.406854,-0.08971 0.828871,-0.108663 1.151069,-0.101082 0.322199,0.01011 0.547106,0.0657 0.547106,0.0657 0,0 -0.184474,0.144042 -0.473821,0.283029 z m 18.787327,0.472558 c -0.320935,0.01011 -0.742952,-0.01137 -1.149806,-0.101082 -0.409382,-0.08213 -0.804865,-0.235015 -1.094211,-0.371476 -0.289347,-0.138987 -0.473822,-0.280502 -0.473822,-0.280502 0,0 0.226171,-0.0556 0.547106,-0.0657 0.320935,-0.0088 0.745479,0.01137 1.152333,0.101082 0.408118,0.08213 0.802337,0.232488 1.092948,0.371476 0.29061,0.138987 0.473821,0.281765 0.473821,0.281765 0,0 -0.226171,0.05433 -0.548369,0.06444 z m 1.301429,-2.10882 c 0.49151,0.07581 0.817499,0.176893 0.817499,0.176893 0,0 -0.327252,0.101082 -0.817499,0.176893 -0.490247,0.07455 -1.142225,0.142778 -1.797994,0.138988 -0.653241,0.0038 -1.306483,-0.06191 -1.797993,-0.137724 -0.490247,-0.07581 -0.816236,-0.178157 -0.816236,-0.178157 0,0 0.327252,-0.102345 0.816236,-0.178157 0.49151,-0.07581 1.143488,-0.141514 1.797993,-0.137724 0.654505,-0.0038 1.307747,0.06444 1.797994,0.138988 z m -4.413487,-0.977967 c 0,0 0.199637,-0.09982 0.488984,-0.189529 0.289346,-0.08845 0.665876,-0.183211 1.038616,-0.241333 0.372739,-0.06318 0.748005,-0.09224 1.017136,-0.142778 0.131406,-0.02906 0.246387,-0.0518 0.305772,-0.09097 0.07202,-0.02906 0.0935,-0.108663 0.09603,-0.09729 -0.01264,0.0051 0.0417,0.04296 0.01011,0.156677 -0.03411,0.104873 -0.113717,0.250178 -0.251441,0.347469 -0.264076,0.216062 -0.663349,0.387902 -1.073994,0.449814 -0.408118,0.07076 -0.822554,0.03664 -1.128327,-0.02653 -0.304509,-0.06065 -0.502882,-0.165521 -0.502882,-0.165521 z M 37.782879,7.3021919 c 0.395483,-0.702519 1.024717,-1.556661 1.880123,-1.671642 0.814972,-0.108663 1.584458,0.392956 2.079759,0.999447 0.202164,0.246387 0.862986,1.272368 1.095474,1.900339 0.495302,1.3267 -0.772012,0.82129 -1.458105,0.48772 -0.883203,-0.429598 -1.693121,-0.569849 -2.640764,-0.770749 -0.68483,-0.144042 -1.260996,-0.403064 -0.956487,-0.945115 z M 35.945716,14.94019 c 0.523099,-0.746743 1.303956,-1.244571 2.202321,-1.402511 0.895838,-0.162995 1.799257,0.0417 2.547263,0.563531 0.214799,0.150359 0.266603,0.446024 0.117508,0.659559 -0.151623,0.214799 -0.447288,0.266604 -0.659559,0.117508 -1.110637,-0.780857 -2.650872,-0.506673 -3.427939,0.605228 -0.09097,0.131406 -0.238806,0.202163 -0.389165,0.202163 -0.0935,0 -0.188265,-0.02653 -0.271658,-0.08466 -0.217326,-0.151623 -0.26913,-0.447287 -0.118771,-0.660822 z m -6.167257,6.005526 c 0.627971,-0.233752 1.2193,-0.57364 1.704493,-1.037353 0.515518,-0.492774 0.763168,-1.052515 1.028508,-1.696912 0.01516,-0.0417 0.02653,-0.06697 0.03791,-0.09603 -0.576167,-0.02527 -1.038616,-0.521835 -1.038616,-0.818763 0,-0.304509 0.483929,-0.552159 1.081576,-0.552159 0.597646,0 1.081575,0.24765 1.081575,0.552159 0,0.296928 -0.462449,0.793493 -1.038616,0.818763 0.01137,0.02906 0.02274,0.05433 0.03791,0.09603 0.04928,0.118771 0.09476,0.319672 0.192056,0.504146 0.622917,1.178867 1.576877,1.755034 2.738054,2.310984 0,0 -0.07328,0.02022 -0.205954,0.04043 -0.130143,0.0013 -0.336097,0.08086 -0.566058,0.03285 -0.228698,-0.04422 -0.523099,-0.05686 -0.789702,-0.20469 -0.645661,-0.358841 -1.286267,-0.951433 -1.449261,-1.700703 0.06823,0.310827 -0.422017,0.900892 -0.610282,1.106847 -0.457396,0.500355 -0.985548,0.675985 -1.628682,0.798546 -0.231224,0.04801 -0.437179,-0.03159 -0.566058,-0.03285 -0.133933,-0.02022 -0.205954,-0.04043 -0.205954,-0.04043 0,0 0.07328,-0.03411 0.197109,-0.08086 z M 28.497247,14.94019 c 0.149095,0.213535 0.09729,0.509199 -0.117508,0.659559 -0.08213,0.05686 -0.178157,0.08466 -0.271657,0.08466 -0.149096,0 -0.295665,-0.07076 -0.389166,-0.202164 -0.777066,-1.1119 -2.313511,-1.386085 -3.427938,-0.605228 -0.214799,0.146569 -0.507936,0.09855 -0.659559,-0.117507 -0.149096,-0.214799 -0.09729,-0.5092 0.117507,-0.659559 0.745479,-0.523099 1.648898,-0.726526 2.547263,-0.563532 0.897102,0.157941 1.677959,0.657032 2.201058,1.403775 z m -3.671799,2.944009 c 0,0 -0.197109,0.104872 -0.502882,0.165521 -0.304509,0.06191 -0.718945,0.09729 -1.127063,0.02653 -0.408118,-0.06191 -0.809918,-0.233752 -1.073994,-0.449814 -0.137725,-0.09729 -0.217326,-0.242596 -0.252705,-0.347469 -0.03285,-0.113717 0.02274,-0.151623 0.01011,-0.156677 0.0038,-0.01011 0.02527,0.06823 0.09729,0.09729 0.05939,0.03917 0.174367,0.06191 0.305773,0.09097 0.267867,0.05054 0.643133,0.0796 1.015873,0.142778 0.374003,0.05812 0.750532,0.152887 1.039879,0.241333 0.289347,0.09097 0.48772,0.189529 0.48772,0.189529 z M 21.62368,8.5303359 c 0.235016,-0.627971 0.893311,-1.653952 1.095475,-1.900339 0.496565,-0.606491 1.267314,-1.10811 2.081023,-0.999447 0.856669,0.114981 1.48464,0.967859 1.880122,1.671642 0.304509,0.542051 -0.270394,0.79981 -0.95775,0.945115 -0.947643,0.2009 -1.757561,0.341151 -2.642027,0.770749 -0.68483,0.334834 -1.952144,0.83898 -1.456843,-0.48772 z M 20.413225,18.862166 c 0.490247,-0.07455 1.143489,-0.141515 1.797994,-0.138988 0.653241,-0.0038 1.307746,0.06191 1.797993,0.137724 0.490247,0.07581 0.8175,0.178157 0.8175,0.178157 0,0 -0.327253,0.101082 -0.8175,0.178157 -0.490247,0.07581 -1.143488,0.141514 -1.797993,0.137724 -0.653242,0.0038 -1.307747,-0.06444 -1.797994,-0.138988 -0.490247,-0.07581 -0.817499,-0.176893 -0.817499,-0.176893 0,0 0.327252,-0.101082 0.817499,-0.176893 z" + id="path3059" /><path + inkscape:connector-curvature="0" + d="m 44.691824,16.186023 c 1.423991,1.991313 3.741292,3.19166 5.196871,5.195608 1.97615,2.724156 3.310431,6.015634 4.445075,9.168125 0.07834,0.216062 0.155413,0.430861 0.231225,0.651978 0.02148,0.05938 0.0417,0.130143 0.07076,0.221116 0.03917,0.121298 0.131406,0.184475 0.170576,0.109927 0.02274,-0.03917 0.04422,-0.08718 0.06444,-0.138988 0.03411,-0.08845 0.06949,-0.181947 0.106136,-0.283029 0.03664,-0.102345 0.06949,-0.193319 0.09729,-0.266603 0.413173,-1.075259 0.716418,-2.347627 0.952697,-4.002842 0.13646,-0.961541 0.223644,-1.930664 0.289347,-2.751954 0.193319,-2.413329 0.343678,-5.965093 -0.596383,-8.930582 -0.529416,-1.672905 -1.619837,-3.368553 -2.777224,-4.317459 -2.016583,-1.6552151 -5.095789,-2.3779511 -7.203346,-0.615336 -1.747453,1.473268 -2.46387,3.982626 -1.047461,5.960039 z" + id="path3061" /><path + inkscape:connector-curvature="0" + d="m 32.230958,28.333536 c -0.808655,0 -1.521282,0.381584 -1.995103,0.966595 -0.357577,0.442233 -0.582484,0.998183 -0.582484,1.609729 0,1.4202 1.156123,2.576324 2.576323,2.576324 1.420201,0 2.576324,-1.156124 2.576324,-2.576324 0,-0.611546 -0.223643,-1.166232 -0.58122,-1.608465 -0.471295,-0.585012 -1.185185,-0.967859 -1.99384,-0.967859 z" + id="path3063" /><path + inkscape:connector-curvature="0" + d="m 11.46369,44.52685 c 1.175077,0 2.328673,-0.533207 3.167653,-1.461897 0.793492,-0.876885 1.168759,-1.957197 1.058832,-3.038773 -0.08086,-0.793493 -0.4018,-1.584458 -0.742951,-2.422174 l -0.0935,-0.229961 c -0.140251,-0.348733 -0.277975,-0.697465 -0.39801,-1.051252 -0.411909,-1.210455 -0.636816,-2.543472 -0.703782,-4.197424 -0.112454,-2.740582 0.272921,-5.441994 0.655768,-8.058751 0.0076,-0.05307 0.01516,-0.106136 0.02274,-0.159204 l 0.04675,-0.318408 c 0.02401,-0.168048 0.07202,-0.396746 0.128879,-0.657032 0.0088,-0.03791 0.01769,-0.08213 0.0278,-0.130143 0.01516,-0.07202 -0.07329,-0.05812 -0.193319,0.03917 -0.07202,0.05812 -0.144042,0.118772 -0.216063,0.178157 -0.463713,0.381584 -0.914791,0.814973 -1.350706,1.285003 -1.070204,1.153597 -2.049434,2.500513 -2.874515,3.705914 -1.3001654,1.901602 -3.1019496,4.763483 -3.7248665,7.650633 -0.3499959,1.619837 -0.2514411,3.516385 0.2514411,4.832976 0.1301429,0.339888 0.3032456,0.675985 0.4965646,1.007028 0.1528864,0.262813 0.3247255,0.516781 0.5129905,0.763169 0.1756297,0.229961 0.3638947,0.446023 0.5660584,0.653241 0.9198449,0.940061 2.0898679,1.609729 3.3622349,1.609729 z" + id="path3065" /></g><g + inkscape:groupmode="layer" + id="layer1" + inkscape:label="Lambda" + style="display:inline"><g + transform="matrix(0.01899666,0,0,0.01435939,25.385925,37.314762)" + inkscape:label="Layer 1" + id="layer1-2" + style="fill:#000000"><path + id="flowRoot1306" + d="m 354.22852,625.15545 0.21093,0 c 0,0.61719 -0.10157,1.06641 -0.30468,1.34766 -0.19923,0.28125 -0.44923,0.42187 -0.75,0.42188 -0.2461,-10e-6 -0.48243,-0.0918 -0.70899,-0.2754 -0.22657,-0.1875 -0.42969,-0.68554 -0.60937,-1.49414 l -0.50391,-2.27343 -1.74609,3.96093 -1.10743,0 2.50782,-5.40234 c -0.13282,-0.69921 -0.29297,-1.21679 -0.48047,-1.55273 -0.1875,-0.33593 -0.41993,-0.5039 -0.69727,-0.50391 -0.22266,10e-6 -0.41797,0.0859 -0.58594,0.25781 -0.16406,0.16798 -0.25586,0.4297 -0.27539,0.78516 l -0.21093,0 c 0.0117,-0.57421 0.12695,-1.0332 0.3457,-1.37695 0.21875,-0.34765 0.49219,-0.52148 0.82031,-0.52149 0.21094,10e-6 0.41016,0.0879 0.59766,0.26367 0.1914,0.17189 0.35546,0.46876 0.49219,0.89063 0.14062,0.41797 0.35742,1.28711 0.65039,2.60742 l 0.41601,1.85742 c 0.16797,0.76953 0.34375,1.28516 0.52735,1.54688 0.18749,0.25781 0.41015,0.38672 0.66797,0.38672 0.43749,0 0.68554,-0.3086 0.74414,-0.92579" + transform="matrix(104.6563,0,0,104.6563,-36414.11,-64667.67)" + inkscape:connector-curvature="0" + style="fill:#000000" /></g></g><g + inkscape:groupmode="layer" + id="layer3" + inkscape:label="Cats" /></svg> \ No newline at end of file diff --git a/static/logo/original.svg b/static/logo/original.svg new file mode 100644 index 0000000..c74fb15 --- /dev/null +++ b/static/logo/original.svg @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve"> +<g> + <path d="M42.787,24.803c-0.206-0.326-0.418-0.647-0.648-0.954c-0.092,0.112-0.189,0.231-0.306,0.368 + c-0.138,0.161-0.29,0.338-0.455,0.532c-2.386,2.787-5.858,4.117-9.354,4.808c-0.087,0.017-0.176,0.027-0.264,0.041 + c0.223,0.423,0.361,0.896,0.361,1.406c0,1.676-1.363,3.039-3.039,3.039s-3.039-1.363-3.039-3.039c0-0.51,0.138-0.984,0.362-1.407 + c-0.088-0.015-0.177-0.024-0.264-0.041c-3.269-0.351-6.377-2.045-8.76-4.257c-0.216-0.2-0.418-0.388-0.604-0.561 + c-0.163-0.191-0.312-0.366-0.447-0.524c-0.028-0.033-0.047-0.057-0.074-0.089c-0.068,0.467-0.196,0.961-0.235,1.231 + c-0.318,2.175-0.655,4.365-0.564,6.57c0.042,1.029,0.171,2.062,0.505,3.04c0.09,0.263,0.192,0.522,0.296,0.781 + c0.311,0.771,0.643,1.536,0.729,2.372c0.251,2.46-1.902,4.663-4.34,4.663c-1.029,0-1.985-0.421-2.795-1.06 + c-0.398,4.612,0.52,9.031,4.215,11.809c0.002,0,1.027,0.65,2.999,0.65c1.406,0,2.947-0.34,4.578-0.978 + c0.326-0.127-0.334-1.901-0.43-2.093c-0.501-0.987-1.422-1.84-2.449-2.264c-0.208-0.086-0.404-0.166-0.585-0.242 + c-0.181-0.09-0.363-0.101-0.519-0.141c-0.159-0.033-0.298-0.062-0.412-0.087c-0.232-0.048-0.364-0.076-0.364-0.076 + s0.134-0.004,0.369-0.01c0.119-0.003,0.264-0.007,0.43-0.011c0.166,0.004,0.361-0.029,0.561,0.019 + c2.301,0.546,4.621,1.774,5.207,4.275c0.037,0.159,0.069,0.299,0.096,0.414c0.008,0.034,0.011,0.049,0.018,0.077 + c1.501,0.131,4.103,0.336,5.514,0.336c0.952,0,1.904-0.064,2.853-0.129c0.602-0.041,1.994,0.145,2.508-0.189 + c0.293-0.191,0.268-0.562,0.381-0.9c0.253-0.759,0.693-1.481,1.244-2.062c1.131-1.187,2.774-1.882,4.41-1.841 + c0.166,0.004,0.31,0.008,0.43,0.011c0.234,0.006,0.369,0.01,0.369,0.01s-0.133,0.028-0.364,0.076 + c-0.114,0.024-0.253,0.054-0.412,0.087c-0.156,0.041-0.338,0.051-0.519,0.141c-0.182,0.076-0.379,0.156-0.586,0.242 + c-0.211,0.069-0.41,0.196-0.608,0.332c-0.196,0.139-0.417,0.246-0.601,0.413c-0.178,0.169-0.356,0.341-0.537,0.513 + c-0.181,0.164-0.291,0.393-0.437,0.576l-0.2,0.281l-0.132,0.311c-0.078,0.203-0.19,0.391-0.231,0.568 + c-0.027,0.178-0.057,0.335-0.088,0.477c-0.018,0.07-0.033,0.136-0.049,0.199c0,0.092,0,0.18,0.002,0.262 + c0,0.164,0,0.307,0.002,0.425c1.631,0.638,3.172,0.978,4.578,0.978c1.985,0,3.012-0.66,3.021-0.668 + C53.177,46.706,45.482,29.983,42.787,24.803z M29.079,48.65c-3.57,0-6.474-2.903-6.474-6.474c0-3.569,2.905-6.474,6.474-6.474 + s6.474,2.904,6.474,6.474C35.553,45.747,32.648,48.65,29.079,48.65z"/> + <path d="M29.079,36.703c-3.019,0-5.474,2.455-5.474,5.474s2.456,5.474,5.474,5.474c3.019,0,5.474-2.455,5.474-5.474 + S32.098,36.703,29.079,36.703z M29.109,39.314c0.774,0.166,1.352-0.157,1.861-0.697c0.208-0.221,0.627-0.266,0.901-0.133 + c0.26,0.125,0.322,0.527,0.083,0.777c-0.136,0.143-0.331,0.273-0.52,0.312c-0.52,0.109-0.97,0.351-1.415,0.619 + c-0.062,0.037-0.129,0.066-0.197,0.095c-0.112,0.045-0.496,0.063-0.737-0.159c-0.145-0.134-0.237-0.314-0.252-0.523 + C28.819,39.416,28.897,39.27,29.109,39.314z M27.393,38.43c0.309,0.109,0.62,0.232,0.897,0.403c0.075,0.046,0.13,0.123,0.181,0.207 + c0.079,0.131,0.138,0.446-0.019,0.61c-0.091,0.095-0.215,0.137-0.377,0.127c-0.594-0.037-1.018-0.484-1.02-1.076 + C27.054,38.464,27.172,38.352,27.393,38.43z M32.777,44.782c-0.545,0.698-2.208,1.333-3.293,0.796 + c-0.824-0.407-1.132-1.487-0.609-2.244c0.023-0.034,0.034-0.076,0.043-0.12c0.013-0.069-0.032-0.138-0.1-0.151 + c-0.041-0.008-0.082-0.018-0.122-0.029c-0.162-0.049-0.324-0.098-0.481-0.161c-0.099-0.039-0.196-0.081-0.293-0.124 + c-0.161-0.071-0.294-0.133-0.297-0.137c-0.004-0.004,0.118-0.117,0.138-0.299c0.019-0.18-0.328-0.242-0.378-0.088 + c-0.02,0.063,0.027,0.133,0.134,0.248c0.019,0.02,0.036,0.043,0.052,0.065c0.026,0.039,0.048,0.073,0.053,0.076 + c0.005,0.002,0.246,0.176,0.37,0.489c0.072,0.183,0.097,0.385,0.084,0.602c-0.005,0.085-0.009,0.171-0.028,0.253 + c-0.097,0.421-0.066,0.838,0.011,1.259c0.051,0.279-0.071,0.504-0.32,0.639c-0.201,0.11-0.415,0.148-0.611-0.015 + c-0.227-0.188-0.321-0.655-0.215-0.942c0.087-0.235,0.213-0.479,0.214-0.719c0.001-0.428-0.075-0.857-0.138-1.283 + c-0.006-0.041-0.173-0.107-0.228-0.082c-0.143,0.065-0.263,0.182-0.397,0.27c-0.276,0.18-0.555,0.357-0.836,0.531 + c-0.054,0.033-0.126,0.061-0.187,0.056c-0.095-0.008-0.252-0.026-0.267-0.075c-0.03-0.088-0.001-0.238,0.064-0.294 + c0.394-0.338,0.83-0.63,1.202-0.989c0.214-0.205,0.415-0.426,0.613-0.649c0.327-0.37,0.577-0.685,0.561-0.702 + s-0.178,0.033-0.361,0.111c-0.111,0.047-0.222,0.093-0.335,0.133c-0.584,0.21-1.032,0.014-1.241-0.533 + c-0.109-0.285-0.018-0.591,0.231-0.75c0.239-0.152,0.418-0.038,0.604,0.128c0.297,0.265,0.647,0.282,1.007,0.146 + c0.203-0.077,0.397-0.176,0.598-0.258c0.288-0.119,0.465-0.074,0.633,0.187c0.1,0.155,0.152,0.343,0.244,0.505 + c0.056,0.1,0.133,0.208,0.229,0.252c0.048,0.021,0.158-0.092,0.24-0.142c0.173-0.106,0.337-0.246,0.525-0.302 + c0.098-0.029,0.32,0.07,0.344,0.153c0.04,0.136,0.004,0.33-0.074,0.452c-0.151,0.236-0.128,0.439,0.133,0.5 + c0.196,0.046,0.407,0.072,0.605,0.05c0.383-0.042,0.539-0.354,0.372-0.702c-0.061-0.127-0.147-0.242-0.217-0.365 + c-0.133-0.23-0.06-0.385,0.203-0.36c0.658,0.062,1.264,0.478,1.006,1.319c-0.134,0.439-0.463,0.703-0.898,0.828 + c-0.163,0.049-0.332,0.076-0.5,0.104c-0.337,0.058-0.588,0.334-0.654,0.672c-0.017,0.086-0.049,0.17-0.086,0.253 + c-0.06,0.135,0.019,0.406,0.184,0.344c0.064-0.023,0.097-0.113,0.128-0.281c0.034-0.182,0.085-0.368,0.166-0.534 + c0.034-0.07,0.168-0.127,0.253-0.124c0.067,0.003,0.158,0.097,0.188,0.171c0.048,0.12,0.079,0.257,0.072,0.385 + c-0.013,0.255,0.117,0.312,0.332,0.298c0.112-0.009,0.23-0.022,0.337,0.002c0.081,0.02,0.209,0.096,0.209,0.146 + c0,0.082-0.071,0.189-0.143,0.238c-0.114,0.08-0.25,0.15-0.385,0.171c-0.201,0.028-0.245,0.14-0.294,0.313 + c-0.048,0.17-0.146,0.354-0.278,0.465c-0.215,0.182-0.436,0.098-0.487-0.217c-0.052-0.326-0.205-0.395-0.488-0.367 + c-0.049,0.006-0.099-0.002-0.15-0.011c-0.082-0.016-0.21,0.207-0.055,0.413c0.085,0.114,0.219,0.201,0.39,0.239 + c0.742,0.165,1.429,0.05,1.983-0.517c0.465-0.475,0.282-1.215-0.352-1.447c-0.142-0.051-0.299-0.066-0.431-0.135 + c-0.077-0.039-0.155-0.146-0.16-0.229c-0.004-0.057,0.111-0.127,0.18-0.182c0.026-0.021,0.071-0.023,0.108-0.028 + c0.44-0.067,1.29,0.325,1.51,0.694C33.206,43.598,33.129,44.333,32.777,44.782z"/> + <path d="M29.916,42.617c0.028-0.001,0.055-0.006,0.083-0.012c0.045-0.008,0.08-0.035,0.077-0.058s-0.164-0.099-0.36-0.17 + c-0.196-0.071-0.281-0.004-0.368,0.093c-0.044,0.049-0.122,0.075-0.206,0.105c-0.076,0.027-0.128,0.145-0.168,0.23 + c-0.013,0.029,0.055,0.133,0.064,0.129c0.079-0.021,0.185-0.043,0.218-0.101C29.415,42.555,29.675,42.625,29.916,42.617z"/> + <path d="M28.297,41.455c-0.212,0.168-0.18,0.345,0.049,0.262c0.151-0.055,0.285-0.146,0.342-0.263 + c0.021-0.043,0.02-0.097,0.014-0.151C28.692,41.219,28.509,41.287,28.297,41.455z"/> + <path d="M16.591,23.92c0.171,0.118,0.361,0.248,0.568,0.39c0.214,0.121,0.445,0.252,0.692,0.392 + c4.123,2.338,8.69,3.497,13.439,3.007c1.364-0.141,2.718-0.435,4.022-0.861c2.215-0.723,4.321-1.621,6.256-2.931 + c0.15-0.102,0.281-0.189,0.404-0.27c-0.56-0.714-1.176-1.383-1.912-1.964c-0.684-0.539-1.384-1.062-1.895-1.776 + c-1.411-1.972-0.77-4.817,1.136-6.212c-0.018-0.039-0.034-0.077-0.052-0.116c-1.223-2.717-2.705-4.299-3.998-4.299 + c-0.499,0-1.009,0.226-1.516,0.671c-1.319,1.157-2.974,1.795-4.657,1.795s-3.337-0.638-4.656-1.795 + c-0.507-0.445-1.017-0.671-1.516-0.671c-1.312,0-2.759,1.542-3.969,4.23c-1.38,3.068-2.65,5.893-2.65,9.484 + c0,0.083-0.025,0.162-0.064,0.235c0.054,0.127,0.072,0.294,0.065,0.488C16.386,23.782,16.478,23.844,16.591,23.92z M22.533,22.764 + c-0.23,0.109-0.542,0.229-0.866,0.294c-0.322,0.071-0.656,0.088-0.911,0.08c-0.255-0.008-0.433-0.053-0.433-0.053 + s0.145-0.113,0.375-0.223c0.23-0.11,0.542-0.229,0.866-0.294c0.322-0.071,0.656-0.086,0.911-0.08 + c0.255,0.008,0.433,0.052,0.433,0.052S22.762,22.654,22.533,22.764z M37.402,23.138c-0.254,0.008-0.588-0.009-0.91-0.08 + c-0.324-0.065-0.637-0.186-0.866-0.294c-0.229-0.11-0.375-0.222-0.375-0.222s0.179-0.044,0.433-0.052 + c0.254-0.007,0.59,0.009,0.912,0.08c0.323,0.065,0.635,0.184,0.865,0.294c0.23,0.11,0.375,0.223,0.375,0.223 + S37.657,23.13,37.402,23.138z M38.432,21.469c0.389,0.06,0.647,0.14,0.647,0.14s-0.259,0.08-0.647,0.14 + c-0.388,0.059-0.904,0.113-1.423,0.11c-0.517,0.003-1.034-0.049-1.423-0.109c-0.388-0.06-0.646-0.141-0.646-0.141 + s0.259-0.081,0.646-0.141c0.389-0.06,0.905-0.112,1.423-0.109C37.527,21.356,38.044,21.41,38.432,21.469z M34.939,20.695 + c0,0,0.158-0.079,0.387-0.15c0.229-0.07,0.527-0.145,0.822-0.191c0.295-0.05,0.592-0.073,0.805-0.113 + c0.104-0.023,0.195-0.041,0.242-0.072c0.057-0.023,0.074-0.086,0.076-0.077c-0.01,0.004,0.033,0.034,0.008,0.124 + c-0.027,0.083-0.09,0.198-0.199,0.275c-0.209,0.171-0.525,0.307-0.85,0.356c-0.323,0.056-0.651,0.029-0.893-0.021 + C35.096,20.778,34.939,20.695,34.939,20.695z M33.473,12.32c0.313-0.556,0.811-1.232,1.488-1.323 + c0.645-0.086,1.254,0.311,1.646,0.791c0.16,0.195,0.683,1.007,0.867,1.504c0.392,1.05-0.611,0.65-1.154,0.386 + c-0.699-0.34-1.34-0.451-2.09-0.61C33.688,12.954,33.232,12.749,33.473,12.32z M32.019,18.365c0.414-0.591,1.032-0.985,1.743-1.11 + c0.709-0.129,1.424,0.033,2.016,0.446c0.17,0.119,0.211,0.353,0.093,0.522c-0.12,0.17-0.354,0.211-0.522,0.093 + c-0.879-0.618-2.098-0.401-2.713,0.479c-0.072,0.104-0.189,0.16-0.308,0.16c-0.074,0-0.149-0.021-0.215-0.067 + C31.941,18.768,31.9,18.534,32.019,18.365z M27.138,23.118c0.497-0.185,0.965-0.454,1.349-0.821 + c0.408-0.39,0.604-0.833,0.814-1.343c0.012-0.033,0.021-0.053,0.03-0.076c-0.456-0.02-0.822-0.413-0.822-0.648 + c0-0.241,0.383-0.437,0.856-0.437c0.473,0,0.856,0.196,0.856,0.437c0,0.235-0.366,0.628-0.822,0.648 + c0.009,0.023,0.018,0.043,0.03,0.076c0.039,0.094,0.075,0.253,0.152,0.399c0.493,0.933,1.248,1.389,2.167,1.829 + c0,0-0.058,0.016-0.163,0.032c-0.103,0.001-0.266,0.064-0.448,0.026c-0.181-0.035-0.414-0.045-0.625-0.162 + c-0.511-0.284-1.018-0.753-1.147-1.346c0.054,0.246-0.334,0.713-0.483,0.876c-0.362,0.396-0.78,0.535-1.289,0.632 + c-0.183,0.038-0.346-0.025-0.448-0.026c-0.106-0.016-0.163-0.032-0.163-0.032S27.04,23.155,27.138,23.118z M26.124,18.365 + c0.118,0.169,0.077,0.403-0.093,0.522c-0.065,0.045-0.141,0.067-0.215,0.067c-0.118,0-0.234-0.056-0.308-0.16 + c-0.615-0.88-1.831-1.097-2.713-0.479c-0.17,0.116-0.402,0.078-0.522-0.093c-0.118-0.17-0.077-0.403,0.093-0.522 + c0.59-0.414,1.305-0.575,2.016-0.446C25.092,17.379,25.71,17.774,26.124,18.365z M23.218,20.695c0,0-0.156,0.083-0.398,0.131 + c-0.241,0.049-0.569,0.077-0.892,0.021c-0.323-0.049-0.641-0.185-0.85-0.356c-0.109-0.077-0.172-0.192-0.2-0.275 + c-0.026-0.09,0.018-0.12,0.008-0.124c0.003-0.008,0.02,0.054,0.077,0.077c0.047,0.031,0.138,0.049,0.242,0.072 + c0.212,0.04,0.509,0.063,0.804,0.113c0.296,0.046,0.594,0.121,0.823,0.191C23.061,20.617,23.218,20.695,23.218,20.695z + M20.684,13.292c0.186-0.497,0.707-1.309,0.867-1.504c0.393-0.48,1.003-0.877,1.647-0.791c0.678,0.091,1.175,0.766,1.488,1.323 + c0.241,0.429-0.214,0.633-0.758,0.748c-0.75,0.159-1.391,0.27-2.091,0.61C21.295,13.943,20.292,14.342,20.684,13.292z + M19.726,21.469c0.388-0.059,0.905-0.112,1.423-0.11c0.517-0.003,1.035,0.049,1.423,0.109c0.388,0.06,0.647,0.141,0.647,0.141 + s-0.259,0.08-0.647,0.141c-0.388,0.06-0.905,0.112-1.423,0.109c-0.517,0.003-1.035-0.051-1.423-0.11 + c-0.388-0.06-0.647-0.14-0.647-0.14S19.338,21.529,19.726,21.469z"/> + <path d="M38.941,19.351c1.127,1.576,2.961,2.526,4.113,4.112c1.564,2.156,2.62,4.761,3.518,7.256 + c0.062,0.171,0.123,0.341,0.183,0.516c0.017,0.047,0.033,0.103,0.056,0.175c0.031,0.096,0.104,0.146,0.135,0.087 + c0.018-0.031,0.035-0.069,0.051-0.11c0.027-0.07,0.055-0.144,0.084-0.224c0.029-0.081,0.055-0.153,0.077-0.211 + c0.327-0.851,0.567-1.858,0.754-3.168c0.108-0.761,0.177-1.528,0.229-2.178c0.153-1.91,0.272-4.721-0.472-7.068 + c-0.419-1.324-1.282-2.666-2.198-3.417c-1.596-1.31-4.033-1.882-5.701-0.487C38.387,15.8,37.82,17.786,38.941,19.351z"/> + <path d="M29.079,28.965c-0.64,0-1.204,0.302-1.579,0.765c-0.283,0.35-0.461,0.79-0.461,1.274c0,1.124,0.915,2.039,2.039,2.039 + s2.039-0.915,2.039-2.039c0-0.484-0.177-0.923-0.46-1.273C30.284,29.268,29.719,28.965,29.079,28.965z"/> + <path d="M12.643,41.781c0.93,0,1.843-0.422,2.507-1.157c0.628-0.694,0.925-1.549,0.838-2.405c-0.064-0.628-0.318-1.254-0.588-1.917 + l-0.074-0.182c-0.111-0.276-0.22-0.552-0.315-0.832c-0.326-0.958-0.504-2.013-0.557-3.322c-0.089-2.169,0.216-4.307,0.519-6.378 + c0.006-0.042,0.012-0.084,0.018-0.126l0.037-0.252c0.019-0.133,0.057-0.314,0.102-0.52c0.007-0.03,0.014-0.065,0.022-0.103 + c0.012-0.057-0.058-0.046-0.153,0.031c-0.057,0.046-0.114,0.094-0.171,0.141c-0.367,0.302-0.724,0.645-1.069,1.017 + c-0.847,0.913-1.622,1.979-2.275,2.933c-1.029,1.505-2.455,3.77-2.948,6.055c-0.277,1.282-0.199,2.783,0.199,3.825 + c0.103,0.269,0.24,0.535,0.393,0.797c0.121,0.208,0.257,0.409,0.406,0.604c0.139,0.182,0.288,0.353,0.448,0.517 + C10.71,41.251,11.636,41.781,12.643,41.781z"/> +</g> +</svg> From 0161003406a7b5d6e765de80bdd8865b3a4c156f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Wed, 2 Jul 2014 23:15:50 +0200 Subject: [PATCH 12/52] Update doc --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 90a8702..a851357 100644 --- a/index.html +++ b/index.html @@ -368,12 +368,12 @@ <h3 id="_monadzero">MonadZero</h3> <div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:where</span> clauses can be used in <span class="monospaced">mlet</span> bindings:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</span> - <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="ss">:where</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> <span class="p">(</span><span class="nf">return</span> <span class="nv">i</span><span class="p">))</span> <span class="c1">;; => [3 4 5]</span> <span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">(</span><span class="nf">t/just</span> <span class="mi">2</span><span class="p">)</span> - <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="ss">:where</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> <span class="p">(</span><span class="nf">m/return</span> <span class="nv">i</span><span class="p">))</span> <span class="c1">;; => #<Nothing ></span> </pre></div></div></div> @@ -552,7 +552,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-02 18:14:21 UTC +Last updated 2014-07-02 23:15:25 CEST </div> </div> </body> From 359411c0229c2c0a6103801efe360aedcad8f979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Sat, 5 Jul 2014 13:00:44 +0200 Subject: [PATCH 13/52] Update doc --- codox/cats.core.html | 6 ++++-- codox/index.html | 2 +- index.html | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index 0212ae7..8f74476 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-filter"><div class="inner"><span>m-filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-for"><div class="inner"><span>m-for</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-lift"><div class="inner"><span>m-lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-map"><div class="inner"><span>m-map</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-sequence"><div class="inner"><span>m-sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-when"><div class="inner"><span>m-when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-filter"><div class="inner"><span>m-filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-for"><div class="inner"><span>m-for</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-lift"><div class="inner"><span>m-lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-map"><div class="inner"><span>m-map</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-sequence"><div class="inner"><span>m-sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-unless"><div class="inner"><span>m-unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-when"><div class="inner"><span>m-when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure </pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. @@ -94,7 +94,9 @@ (m/m-sequence [(t/nothing) (t/just 3)]) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. +</pre></div></div><div class="public anchor" id="var-m-unless"><h3>m-unless</h3><div class="usage"><code>(m-unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. diff --git a/codox/index.html b/codox/index.html index 0dd3ccd..ea7d92f 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-m-filter">m-filter</a> </li><li> <a href="cats.core.html#var-m-for">m-for</a> </li><li> <a href="cats.core.html#var-m-lift">m-lift</a> </li><li> <a href="cats.core.html#var-m-map">m-map</a> </li><li> <a href="cats.core.html#var-m-sequence">m-sequence</a> </li><li> <a href="cats.core.html#var-m-when">m-when</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-m-filter">m-filter</a> </li><li> <a href="cats.core.html#var-m-for">m-for</a> </li><li> <a href="cats.core.html#var-m-lift">m-lift</a> </li><li> <a href="cats.core.html#var-m-map">m-map</a> </li><li> <a href="cats.core.html#var-m-sequence">m-sequence</a> </li><li> <a href="cats.core.html#var-m-unless">m-unless</a> </li><li> <a href="cats.core.html#var-m-when">m-when</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index a851357..6fbd655 100644 --- a/index.html +++ b/index.html @@ -365,15 +365,15 @@ <h3 id="_monadzero">MonadZero</h3> <span class="p">(</span><span class="nf">>>=</span> <span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> <span class="nv">just</span><span class="p">))</span> <span class="c1">;; => true</span> </pre></div></div></div> -<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:where</span> clauses can be used in <span class="monospaced">mlet</span> bindings:</p></div> +<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:when</span> clauses can be used in <span class="monospaced">mlet</span> bindings:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</span> - <span class="ss">:where</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> <span class="p">(</span><span class="nf">return</span> <span class="nv">i</span><span class="p">))</span> <span class="c1">;; => [3 4 5]</span> <span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">(</span><span class="nf">t/just</span> <span class="mi">2</span><span class="p">)</span> - <span class="ss">:where</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> <span class="p">(</span><span class="nf">m/return</span> <span class="nv">i</span><span class="p">))</span> <span class="c1">;; => #<Nothing ></span> </pre></div></div></div> @@ -552,7 +552,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-02 23:15:25 CEST +Last updated 2014-07-05 12:29:14 CEST </div> </div> </body> From 1f90932f7fbb9997b47dde5f8d73f0c9d36a1631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Sat, 5 Jul 2014 13:09:10 +0200 Subject: [PATCH 14/52] Update doc --- codox/cats.core.html | 78 ++++++++++++++++++++++---------------------- codox/index.html | 2 +- index.html | 2 +- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index 8f74476..f4fae58 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-filter"><div class="inner"><span>m-filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-for"><div class="inner"><span>m-for</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-lift"><div class="inner"><span>m-lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-map"><div class="inner"><span>m-map</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-sequence"><div class="inner"><span>m-sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-unless"><div class="inner"><span>m-unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-m-when"><div class="inner"><span>m-when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure </pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. @@ -21,10 +21,7 @@ Shortly, return the second value of pair instance returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div></div><div class="public anchor" id="var-m-filter"><h3>m-filter</h3><div class="usage"><code>(m-filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, +a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, returning the identity element when the predicate yields false. Otherwise, returns the instance unchanged. @@ -32,32 +29,35 @@ (require '[cats.types :as t]) (require '[cats.core :as m]) - (m/m-filter (partial < 2) (t/just 3)) + (m/filter (partial < 2) (t/just 3)) ;=> <Just [3]> - (m/m-filter (partial < 4) (t/just 3)) + (m/filter (partial < 4) (t/just 3)) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-m-for"><h3>m-for</h3><div class="usage"><code>(m-for vs mf)</code></div><div class="doc"><pre class="plaintext">Same as m-map but with the arguments in reverse order. +</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. (require '[cats.types :as t]) (require '[cats.core :as m]) -(m/m-for [2 3] t/just) +(m/forseq [2 3] t/just) ;=> <Just [[2 3]]> -(m/m-for [1 2] - (fn [v] +(m/forseq [1 2] + (fn [v] (if (odd? v) (t/just v) (t/nothing)))) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-m-lift"><h3>m-lift</h3><h4 class="type">macro</h4><div class="usage"><code>(m-lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a +</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that returns +the current state.</pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><h4 class="type">macro</h4><div class="usage"><code>(lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a monadic context. (require '[cats.types :as t]) (require '[cats.core :as m]) - (def monad+ (m/m-lift 2 +)) + (def monad+ (m/lift 2 +)) (monad+ (t/just 1) (t/just 2)) ;=> <Just [3]> @@ -67,38 +67,23 @@ (monad+ [0 2 4] [1 2]) ;=> [1 2 3 4 5 6] -</pre></div></div><div class="public anchor" id="var-m-map"><h3>m-map</h3><div class="usage"><code>(m-map mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a +</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a monadic context, map it into the given collection -calling m-sequence on the results. +calling sequence on the results. (require '[cats.types :as t]) (require '[cats.core :as m]) - (m/m-map t/just [2 3]) + (m/mapseq t/just [2 3]) ;=> <Just [[2 3]]> - (m/m-map (fn [v] - (if (odd? v) - (t/just v) - (t/nothing))) - [1 2]) + (m/mapseq (fn [v] + (if (odd? v) + (t/just v) + (t/nothing))) + [1 2]) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-m-sequence"><h3>m-sequence</h3><div class="usage"><code>(m-sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect -their values in a vector returned in the monadic context. - - (require '[cats.types :as t]) - (require '[cats.core :as m]) - - (m/m-sequence [(t/just 2) (t/just 3)]) - ;=> <Just [[2, 3]]> - - (m/m-sequence [(t/nothing) (t/just 3)]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-m-unless"><h3>m-unless</h3><div class="usage"><code>(m-unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-m-when"><h3>m-when</h3><div class="usage"><code>(m-when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 @@ -118,5 +103,20 @@ (def initial-state 1) (run-state computation initial-state) -This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that applies -specified function to state and return the old state.</pre></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect +their values in a vector returned in the monadic context. + + (require '[cats.types :as t]) + (require '[cats.core :as m]) + + (m/sequence [(t/just 2) (t/just 3)]) + ;=> <Just [[2, 3]]> + + (m/sequence [(t/nothing) (t/just 3)]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that applies +specified function to state and return the old state.</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/index.html b/codox/index.html index ea7d92f..9581e7f 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-m-filter">m-filter</a> </li><li> <a href="cats.core.html#var-m-for">m-for</a> </li><li> <a href="cats.core.html#var-m-lift">m-lift</a> </li><li> <a href="cats.core.html#var-m-map">m-map</a> </li><li> <a href="cats.core.html#var-m-sequence">m-sequence</a> </li><li> <a href="cats.core.html#var-m-unless">m-unless</a> </li><li> <a href="cats.core.html#var-m-when">m-when</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 6fbd655..5ea7fcd 100644 --- a/index.html +++ b/index.html @@ -552,7 +552,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-05 12:29:14 CEST +Last updated 2014-07-05 13:08:43 CEST </div> </div> </body> From 5af0124831346af43a5ece287e6e7d2f02f8437b Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Wed, 9 Jul 2014 15:23:15 +0200 Subject: [PATCH 15/52] Update doc --- codox/cats.core.html | 2 +- codox/cats.protocols.html | 2 +- codox/cats.types.html | 5 +- codox/index.html | 2 +- index.html | 271 ++++++++++++++++++++++++++------------ 5 files changed, 192 insertions(+), 90 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index f4fae58..e4596d8 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure </pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. diff --git a/codox/cats.protocols.html b/codox/cats.protocols.html index 27ee80d..93bfe39 100644 --- a/codox/cats.protocols.html +++ b/codox/cats.protocols.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-bind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bind</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-bind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bind</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. </pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure ctx v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap fv f)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. diff --git a/codox/cats.types.html b/codox/cats.types.html index 91cae83..0c566d3 100644 --- a/codox/cats.types.html +++ b/codox/cats.types.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><div class="doc"><pre class="plaintext">Monadic types definition. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><div class="doc"><pre class="plaintext">Monadic types definition. </pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Continuation. </pre></div></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Either. </pre></div></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Just. @@ -21,4 +21,5 @@ to State class instance. State class instance work as simple wrapper for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div></div></body></html> \ No newline at end of file +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +State type.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/index.html b/codox/index.html index 9581e7f..71bff03 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li><li> <a href="cats.types.html#var-state.3F">state?</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 5ea7fcd..1150067 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ <h1>Category Theory abstractions for Clojure</h1> <span id="author">Andrey Antukh & Alejandro Gómez</span><br> <span id="revnumber">version 0.1.0,</span> -<span id="revdate">2014-06-06</span> +<span id="revdate">2014-07-08</span> <div id="toc"> <div id="toctitle">Table of Contents</div> <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript> @@ -65,15 +65,68 @@ <h3 id="_philosophy">Philosophy</h3> </li> </ul></div> </div> +<div class="sect2"> +<h3 id="_why_another_library">Why another library?</h3> +<div class="paragraph"><p>Because cats library:</p></div> +<div class="ulist"><ul> +<li> +<p> +targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong> +</p> +</li> +<li> +<p> +targets to have the most simple implementation for supported abstractions. +</p> +</li> +<li> +<p> +targets to have more abstractions that simple monad. +</p> +</li> +<li> +<p> +has documentation as first class citizen. +</p> +</li> +<li> +<p> +licensed under permisive license (in comparison with other libraries): BSD (2-Clause) +</p> +</li> +</ul></div> +<div class="paragraph"><p>This is a incomplete list of differences with other existing libraries:</p></div> +<div class="ulist"><ul> +<li> +<p> +The official monads library <span class="monospaced">algo.monads</span> is very good, but its approach for modeling + is slighty limited (as example, you always should specify that monad you want use instead + relying on the type). And obviously because it only has monads. +</p> +</li> +<li> +<p> +Fluokitten is the best library that we found, but the future of it is uncertain. One big + difference with fluokitten library is that <span class="monospaced">cats</span> not intends extend every clojure type + with monadic protocols, for obvious reason of monad, functor and applicative represents + context/wrapper type and it not make sense implement Functor protocol for <span class="monospaced">java.lang.String</span>. +</p> +</li> +<li> +<p> +<span class="monospaced">bwo/monads</span> is the last monads library. It is completely undocumented and its implementation + has much innecesary complexity. +</p> +</li> +</ul></div> </div> -</div> -<div class="sect1"> -<h2 id="_project_maturity">Project Maturity</h2> -<div class="sectionbody"> +<div class="sect2"> +<h3 id="_project_maturity">Project Maturity</h3> <div class="paragraph"><p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> breakage.</p></div> </div> </div> +</div> <div class="sect1"> <h2 id="_install">Install</h2> <div class="sectionbody"> @@ -100,7 +153,7 @@ <h3 id="_leiningen">Leiningen</h3> it as a dependency in your <strong><em>project.clj</em></strong>:</p></div> <div class="listingblock"> <div class="title"><em>in project.clj</em></div> -<div class="content"><div class="highlight"><pre><span class="p">[</span><span class="nv">cats</span> <span class="s">"0.1.0-SNAPSHOT"</span><span class="p">]</span> +<div class="content"><div class="highlight"><pre><span class="p">[</span><span class="nv">cats</span> <span class="s">"0.1.0"</span><span class="p">]</span> </pre></div></div></div> </div> <div class="sect2"> @@ -117,7 +170,7 @@ <h3 id="_maven">Maven</h3> <div class="content"><div class="highlight"><pre><span class="nt"><dependency></span> <span class="nt"><groupId></span>cats<span class="nt"></groupId></span> <span class="nt"><artifactId></span>cats<span class="nt"></artifactId></span> - <span class="nt"><version></span>0.1.0-SNAPSHOT<span class="nt"></version></span> + <span class="nt"><version></span>0.1.0<span class="nt"></version></span> <span class="nt"></dependency></span> </pre></div></div></div> </div> @@ -132,65 +185,10 @@ <h3 id="_get_the_code">Get the Code</h3> </div> </div> <div class="sect1"> -<h2 id="_why_another_library">Why another library?</h2> -<div class="sectionbody"> -<div class="paragraph"><p>Because cats library:</p></div> -<div class="ulist"><ul> -<li> -<p> -targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong> -</p> -</li> -<li> -<p> -targets to have the most simple implementation for supported abstractions. -</p> -</li> -<li> -<p> -targets to have more abstractions that simple monad. -</p> -</li> -<li> -<p> -has documentation as first class citizen. -</p> -</li> -<li> -<p> -licensed under permisive license (in comparison with other libraries): BSD (2-Clause) -</p> -</li> -</ul></div> -<div class="paragraph"><p>With differences with other existing libraries:</p></div> -<div class="ulist"><ul> -<li> -<p> -The official monads library <span class="monospaced">algo.monads</span> is very good, but its approach for modeling - is slighty limited (as example, you always should specify that monad you want use instead - relying on the type). And obviously because it only has monads. -</p> -</li> -<li> -<p> -Fluokitten is the best library that we found, but the future of it is uncertain. One big - difference with fluokitten library is that <span class="monospaced">cats</span> not intends extend every clojure type - with monadic protocols, for obvious reason of monad, functor and applicative represents - context/wrapper type and it not make sense implement Functor protocol for <span class="monospaced">java.lang.String</span>. -</p> -</li> -<li> -<p> -<span class="monospaced">bwo/monads</span> is the last monads library. It is completely undocumented and its implementation - has much innecesary complexity. -</p> -</li> -</ul></div> -</div> -</div> -<div class="sect1"> -<h2 id="_abstractions_reference">Abstractions Reference</h2> +<h2 id="_protocols_reference">Protocols reference</h2> <div class="sectionbody"> +<div class="paragraph"><p><strong>In this section, we are using <em>Maybe</em> type for all examples. You can see more about +it in the next section.</strong></p></div> <div class="sect2"> <h3 id="_functor">Functor</h3> <div class="paragraph"><p>The Functor represents some sort of "computational context".</p></div> @@ -212,7 +210,7 @@ <h3 id="_functor">Functor</h3> <span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> <span class="c1">;; => #<Just [2]></span> </pre></div></div></div> -<div class="paragraph"><p>Same example but applying function over Nothing:</p></div> +<div class="paragraph"><p>Same example but applying function over <strong>Nothing</strong>:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> <span class="c1">;; => #<Nothing ></span> @@ -245,8 +243,6 @@ <h3 id="_functor">Functor</h3> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nb">map inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> <span class="c1">;; => (2 3 4)</span> </pre></div></div></div> -<div class="paragraph"><p>You can see more information and examples of clojure types that implements this protocol -on the last section of this documentation.</p></div> </div> <div class="sect2"> <h3 id="_applicative_functor">Applicative Functor</h3> @@ -293,7 +289,7 @@ <h3 id="_applicative_functor">Applicative Functor</h3> <span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nb">right </span><span class="ss">:foo</span><span class="p">)</span> <span class="ss">:bar</span><span class="p">)</span> <span class="c1">;; => #<Either [:bar :right]></span> </pre></div></div></div> -<div class="paragraph"><p>The real purpose of this function you will see in a following <span class="monospaced">Monad</span> section.</p></div> +<div class="paragraph"><p>The real purpose of this function you will see when using a <strong>Monad</strong> abstraction.</p></div> </div> <div class="sect2"> <h3 id="_monad">Monad</h3> @@ -338,7 +334,8 @@ <h3 id="_monad">Monad</h3> <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> <span class="c1">;; => #<Just [3]></span> </pre></div></div></div> -<div class="paragraph"><p>If you want to use regular (non-monadic) let bindings inside a <span class="monospaced">mlet</span> block, you can do so using <span class="monospaced">:let</span> and a bindings vector as a pair inside the mlet bindings:</p></div> +<div class="paragraph"><p>If you want to use regular (non-monadic) let bindings inside a <span class="monospaced">mlet</span> block, you can do so using +<span class="monospaced">:let</span> and a bindings vector as a pair inside the mlet bindings:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> @@ -349,7 +346,8 @@ <h3 id="_monad">Monad</h3> </div> <div class="sect2"> <h3 id="_monadzero">MonadZero</h3> -<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">MonadZero</a> protocol represents a monad that has a notion of an identity element.</p></div> +<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">MonadZero</a> protocol +represents a monad that has a notion of an identity element.</p></div> <div class="listingblock"> <div class="title">MonadZero protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadZero</span> @@ -365,7 +363,8 @@ <h3 id="_monadzero">MonadZero</h3> <span class="p">(</span><span class="nf">>>=</span> <span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> <span class="nv">just</span><span class="p">))</span> <span class="c1">;; => true</span> </pre></div></div></div> -<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:when</span> clauses can be used in <span class="monospaced">mlet</span> bindings:</p></div> +<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:when</span> clauses can be used in <span class="monospaced">mlet</span> +bindings:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</span> <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> @@ -380,14 +379,16 @@ <h3 id="_monadzero">MonadZero</h3> </div> <div class="sect2"> <h3 id="_monadplus">MonadPlus</h3> -<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadPlus">MonadPlus</a> protocol represents a MonadZero wich has a plus operation.</p></div> +<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadPlus">MonadPlus</a> protocol +represents a MonadZero wich has a plus operation.</p></div> <div class="listingblock"> <div class="title">MonadPlus protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadPlus</span> <span class="s">"A `MonadZero` that supports the notion of addition."</span> <span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">mv</span><span class="o">'</span><span class="p">]</span> <span class="s">"An associative addition operation."</span><span class="p">))</span> </pre></div></div></div> -<div class="paragraph"><p><span class="monospaced">mplus</span> is an associative binary operation for which the value that <span class="monospaced">mzero</span> gives is the identity element. The <span class="monospaced">mplus</span> version contained in the core namespace is variadic.</p></div> +<div class="paragraph"><p><span class="monospaced">mplus</span> is an associative binary operation for which the value that <span class="monospaced">mzero</span> gives is the identity +element. The <span class="monospaced">mplus</span> version contained in the core namespace is variadic.</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">just</span> <span class="nv">nothing</span><span class="p">]])</span> <span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">mplus</span><span class="p">]])</span> @@ -408,13 +409,13 @@ <h3 id="_monadplus">MonadPlus</h3> </div> </div> <div class="sect1"> -<h2 id="_data_types_reference">Data Types Reference</h2> +<h2 id="_data_types_reference">Data Types reference</h2> <div class="sectionbody"> <div class="paragraph"><p>We talked about values in a context, but that is a context? Context per se is any value that wraps an other value inside.</p></div> <div class="sect2"> <h3 id="_maybe">Maybe</h3> -<div class="paragraph"><p>Two most common wrapper is "Maybe" (commonly named Optional on not functional programming +<div class="paragraph"><p>This is one of the two most used monad types (commonly named Optional on not functional programming languages).</p></div> <div class="paragraph"><p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is used as the return type of functions which may or may not return a meaningful value when they @@ -501,17 +502,117 @@ <h2 id="_clojure_types">Clojure Types</h2> that, their should not extend previously explained protocols.</td> </tr></table> </div> -<div class="sect2"> -<h3 id="_vector">Vector</h3> -<div class="paragraph"><p>TODO</p></div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<caption class="title">Table 1. Summary of clojure types and implemented protocols</caption> +<col style="width:50%;"> +<col style="width:50%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Name </th> +<th class="tableblock halign-left valign-top" > Implemented protocols</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">vector</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">has-set</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">list</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">atom</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">No one (in future)</p></td> +</tr> +</tbody> +</table> </div> -<div class="sect2"> -<h3 id="_list">List</h3> -<div class="paragraph"><p>TODO</p></div> </div> +<div class="sect1"> +<h2 id="_special_use_case_of_monads">Special use case of monads</h2> +<div class="sectionbody"> <div class="sect2"> -<h3 id="_set">Set</h3> -<div class="paragraph"><p>TODO</p></div> +<h3 id="_state_monad">State monad</h3> +<div class="paragraph"><p>State monad in one of the special use case of mode most used in haskell. It has different +purposes including: lazy computation composition, mantain state without state.</p></div> +<div class="paragraph"><p>The de facto monadic type of state monad is a plain function. Function represents a computation +as is (without executig it). Obviously, a function should have some special characteristics for work +in monad state composition.</p></div> +<div class="listingblock"> +<div class="title">Valid function for valid state monad</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">state</span><span class="p">]</span> + <span class="s">"Takes state as argument and return a vector</span> +<span class="s"> with first argument with procesed value and</span> +<span class="s"> second argument the transformed new state."</span> + <span class="p">(</span><span class="k">let </span><span class="p">[</span><span class="nv">newvalue</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)</span> + <span class="nv">newstate</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">)]</span> + <span class="p">[</span><span class="nv">newvalue</span> <span class="nv">newstate</span><span class="p">]))</span> +</pre></div></div></div> +<div class="paragraph"><p>Right, you just see an example of the low level primitive of state monad but for basic usage +you do not need build your own functions, just use some helpers that <em>cats</em> library gives you.</p></div> +<div class="paragraph"><p>Let see one example before explaining anything:</p></div> +<div class="listingblock"> +<div class="title">Lazy composition of computations</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/mlet</span> <span class="p">[</span><span class="nv">state</span> <span class="p">(</span><span class="nf">m/get-state</span><span class="p">)</span> + <span class="nv">_</span> <span class="p">(</span><span class="nf">m/put-state</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">))]</span> + <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)))</span> +<span class="c1">;;=> #<State cats.types.State@2eebabb6></span> +</pre></div></div></div> +<div class="paragraph"><p>At the momment of evaluating the previous expression, anything that we have defined +is executed. Instead of it, a strange/unknown object is returned of type <strong>State</strong>.</p></div> +<div class="paragraph"><p>State is a simple wrapper for clojure function, nothing more.</p></div> +<div class="paragraph"><p>Now, it time to execute the composed computation, for this we can use one of the following +functions exposed by <em>cats</em>: <span class="monospaced">run-state</span>, <span class="monospaced">eval-state</span> and <span class="monospaced">exec-state</span>.</p></div> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">run-state</span> function executes the composed computation and return both, the value and the + result state. +</p> +</li> +<li> +<p> +<span class="monospaced">eval-state</span> function executes the composed computation and returns the resulting value + discarding the state. +</p> +</li> +<li> +<p> +<span class="monospaced">exec-state</span> function executes the composed computation and return only the resulting + state, ignoring the resulting value. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="title">This is happens when we execute these three functions over previously generated <span class="monospaced">State</span> instance</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/run-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;;=> #<Pair [1 (2 3)]></span> +<span class="p">(</span><span class="nf">m/eval-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;;=> 1</span> +<span class="p">(</span><span class="nf">m/exec-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;;=> (2 3)</span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">the pair instance returned by <span class="monospaced">run-state</span> functions works like any other seq of clojure, with +difference that pair only can have two slots.</td> +</tr></table> +</div> +<div class="paragraph"><p>This is a very basic example of state monad, it has a lot of use cases and explaining all them +seems out of the scope of this document.</p></div> +<div class="paragraph"><p>However, if you have better example for explain state monad, documentation for an other monad or +any other contribution is always welcome.</p></div> </div> </div> </div> @@ -552,7 +653,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-05 13:08:43 CEST +Last updated 2014-07-09 15:22:58 CEST </div> </div> </body> From 5b918734507ab3274869a90f2cd0612195d873e3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Wed, 9 Jul 2014 20:12:12 +0200 Subject: [PATCH 16/52] Update doc --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 1150067..8a19fc5 100644 --- a/index.html +++ b/index.html @@ -511,7 +511,7 @@ <h2 id="_clojure_types">Clojure Types</h2> <col style="width:50%;"> <thead> <tr> -<th class="tableblock halign-left valign-top" > Name </th> +<th class="tableblock halign-left valign-top" > Name </th> <th class="tableblock halign-left valign-top" > Implemented protocols</th> </tr> </thead> @@ -521,7 +521,7 @@ <h2 id="_clojure_types">Clojure Types</h2> <td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">has-set</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">hash-set</p></td> <td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> @@ -653,7 +653,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-09 15:22:58 CEST +Last updated 2014-07-09 20:11:55 CEST </div> </div> </body> From 8f4e049be8a98cae180107d1479797a83d548d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Wed, 9 Jul 2014 23:26:52 +0200 Subject: [PATCH 17/52] Update doc --- codox/cats.core.html | 18 +++--- index.html | 138 +++++++++++++++++++++---------------------- 2 files changed, 77 insertions(+), 79 deletions(-) diff --git a/codox/cats.core.html b/codox/cats.core.html index e4596d8..8937f52 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -14,11 +14,11 @@ applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. -Shortly, return the first value of pair instance +Equivalent to taking the first value of the pair instance returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant state. -Shortly, return the second value of pair instance +Equivalent to taking the second value of the pair instance returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside av's context, applies the function to value and return a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, @@ -49,7 +49,7 @@ (t/just v) (t/nothing)))) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that returns +</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns the current state.</pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. </pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><h4 class="type">macro</h4><div class="usage"><code>(lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a monadic context. @@ -87,13 +87,13 @@ default/effect free context. This is multiarity function that with arity pure/1 -it uses the dynamic scope for resolve the current -context. With pure/2, you can force specific context -value.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that replaces +it uses the dynamic scope to resolve the current +context. With pure/2, you can force a specific context +value.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces the current state with specified new state.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"></div><div class="doc"><pre class="plaintext">This is a monad version of pure. </pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the wrapped computation and return its value.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return Pair +wrapped computation and returns a Pair instance with result and new state. (def computation (mlet [x (get-state) @@ -114,8 +114,8 @@ (m/sequence [(t/nothing) (t/just 3)]) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return State instance with computation that applies -specified function to state and return the old state.</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. +</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the +specified function to state and returns the old state.</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. diff --git a/index.html b/index.html index 8a19fc5..a798e26 100644 --- a/index.html +++ b/index.html @@ -76,12 +76,12 @@ <h3 id="_why_another_library">Why another library?</h3> </li> <li> <p> -targets to have the most simple implementation for supported abstractions. +aims to have the most simple implementation for supported abstractions. </p> </li> <li> <p> -targets to have more abstractions that simple monad. +aims to have more abstractions that are simple monads. </p> </li> <li> @@ -91,31 +91,31 @@ <h3 id="_why_another_library">Why another library?</h3> </li> <li> <p> -licensed under permisive license (in comparison with other libraries): BSD (2-Clause) +licensed under a permissive license (compared to other libraries): BSD (2-Clause) </p> </li> </ul></div> -<div class="paragraph"><p>This is a incomplete list of differences with other existing libraries:</p></div> +<div class="paragraph"><p>This is an incomplete list of differences with other existing libraries:</p></div> <div class="ulist"><ul> <li> <p> The official monads library <span class="monospaced">algo.monads</span> is very good, but its approach for modeling - is slighty limited (as example, you always should specify that monad you want use instead + is slighty limited (e.g. you always need to specify what monad you want use instead of relying on the type). And obviously because it only has monads. </p> </li> <li> <p> Fluokitten is the best library that we found, but the future of it is uncertain. One big - difference with fluokitten library is that <span class="monospaced">cats</span> not intends extend every clojure type - with monadic protocols, for obvious reason of monad, functor and applicative represents - context/wrapper type and it not make sense implement Functor protocol for <span class="monospaced">java.lang.String</span>. + difference with fluokitten is that <span class="monospaced">cats</span> doesn’t aim to extend every clojure type + with monadic protocols, for the obvious reason that monad; functor and applicative represents + context/wrapper types and it doesn’t make sense to implement Functor protocol for <span class="monospaced">java.lang.String</span>. </p> </li> <li> <p> <span class="monospaced">bwo/monads</span> is the last monads library. It is completely undocumented and its implementation - has much innecesary complexity. + has much unnecesary complexity. </p> </li> </ul></div> @@ -133,7 +133,7 @@ <h2 id="_install">Install</h2> <div class="paragraph"><p>This section covers installing <em>cats</em>.</p></div> <div class="sect2"> <h3 id="_requirements">Requirements</h3> -<div class="paragraph"><p><em>cats</em> has support for these jvm versions:</p></div> +<div class="paragraph"><p><em>cats</em> supports:</p></div> <div class="ulist"><ul> <li> <p> @@ -152,7 +152,6 @@ <h3 id="_leiningen">Leiningen</h3> <div class="paragraph"><p>The simplest way to use <em>cats</em> in a Clojure project is by including it as a dependency in your <strong><em>project.clj</em></strong>:</p></div> <div class="listingblock"> -<div class="title"><em>in project.clj</em></div> <div class="content"><div class="highlight"><pre><span class="p">[</span><span class="nv">cats</span> <span class="s">"0.1.0"</span><span class="p">]</span> </pre></div></div></div> </div> @@ -187,7 +186,7 @@ <h3 id="_get_the_code">Get the Code</h3> <div class="sect1"> <h2 id="_protocols_reference">Protocols reference</h2> <div class="sectionbody"> -<div class="paragraph"><p><strong>In this section, we are using <em>Maybe</em> type for all examples. You can see more about +<div class="paragraph"><p><strong>In this section, we are using <em>Maybe</em> type for all examples. You can read more about it in the next section.</strong></p></div> <div class="sect2"> <h3 id="_functor">Functor</h3> @@ -199,9 +198,9 @@ <h3 id="_functor">Functor</h3> <span class="s">"Applies function f to the value(s) inside</span> <span class="s"> the context of the functor fv."</span><span class="p">))</span> </pre></div></div></div> -<div class="paragraph"><p><span class="monospaced">fmap</span> takes one wrapped value in functor context fv (ex: <span class="monospaced">Just 2</span>) and plain function, -unwraps the value and apply a function to plain value returning it wrapped in a new context -of <strong>the same type</strong> of the first argument.</p></div> +<div class="paragraph"><p><span class="monospaced">fmap</span> takes one wrapped value in functor context fv (ex: <span class="monospaced">Just 2</span>) and a plain function, +unwraps the value and applies a function to the plain value returning it wrapped in a new context +of <strong>the same type</strong> as the first argument.</p></div> <div class="paragraph"><p>Some examples can explain it better:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> @@ -221,24 +220,24 @@ <h3 id="_functor">Functor</h3> <div class="title">Note</div> </td> <td class="content"> -<div class="paragraph"><p>The real fmap signature is <span class="monospaced">(a -> b) -> f a -> f b</span> that can be traslated to clojure <span class="monospaced">[f fv]</span>.</p></div> -<div class="paragraph"><p>The changed order on protocol parameters definition is required because of clojure’s protocols -limitation that only allow dispatching on first argument.</p></div> -<div class="paragraph"><p>You should never use protocol function directly. For it, <span class="monospaced">cats.core/fmap</span> exists, and it has +<div class="paragraph"><p>The real fmap signature is <span class="monospaced">(a -> b) -> f a -> f b</span> that can be translated to clojure <span class="monospaced">[f fv]</span>.</p></div> +<div class="paragraph"><p>The changed order of the protocol parameters definition is required because of clojure’s protocols +limitation that only allow dispatching on the first argument.</p></div> +<div class="paragraph"><p>You should never use a protocol function directly. Instead use <span class="monospaced">cats.core/fmap</span>. It has the correct signature.</p></div> -<div class="paragraph"><p>All examples of this documentation uses <span class="monospaced">cats.core/fmap</span> instead of function defined in the +<div class="paragraph"><p>All examples in this documentation uses <span class="monospaced">cats.core/fmap</span> instead of a function defined in the protocol.</p></div> </td> </tr></table> </div> -<div class="paragraph"><p>Some of native clojure types, like Vector, also implements the Functor protocol and can -work like functor context/container:</p></div> +<div class="paragraph"><p>Some of the native clojure types, like Vector, also implements the Functor protocol and can +work like a functor context/container:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> <span class="c1">;; => [2 3 4]</span> </pre></div></div></div> -<div class="paragraph"><p>The main difference of previous example with default clojure map, is that the clojure -map works with seqs and it not respects the input container:</p></div> +<div class="paragraph"><p>The main difference compared to the previous example with default clojure map, is that the clojure +map works with seqs and doesn’t respect the input container:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nb">map inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> <span class="c1">;; => (2 3 4)</span> @@ -255,11 +254,11 @@ <h3 id="_applicative_functor">Applicative Functor</h3> <span class="s"> inside av's context while preserving the context."</span><span class="p">)</span> <span class="p">(</span><span class="nf">pure</span> <span class="p">[</span><span class="nv">ctx</span> <span class="nv">v</span><span class="p">]</span> <span class="s">"Takes any context monadic value ctx and any value v, and puts</span> -<span class="s"> the value v in the most minimal context of same type of ctx"</span><span class="p">))</span> +<span class="s"> the value v in the most minimal context of the same type of ctx"</span><span class="p">))</span> </pre></div></div></div> -<div class="paragraph"><p>With the same idea of data inside a context (like <span class="monospaced">Functor</span>), what is happens if a wrapped value is +<div class="paragraph"><p>With the same idea of data inside a context (like <span class="monospaced">Functor</span>), what happens if a wrapped value is one function/computation? Applicative functors works like plain functors but additionally -can apply function wrapped in some context similar to input value.</p></div> +can apply a function wrapped in some context similar to input value.</p></div> <div class="paragraph"><p>Let see one example:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defn </span><span class="nv">make-greeter</span> @@ -278,10 +277,10 @@ <h3 id="_applicative_functor">Applicative Functor</h3> <span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"it"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> <span class="c1">;; => #<Nothing ></span> </pre></div></div></div> -<div class="paragraph"><p>Moreover, applicative functor protocol comes with an other function: <span class="monospaced">pure</span>. The main purpose of -it, is given any value in a context and new value, wraps the new value in a minimal context of same -type as first argument.</p></div> -<div class="paragraph"><p>To understand it better, see some examples:</p></div> +<div class="paragraph"><p>Moreover, the applicative functor protocol comes with another function: <span class="monospaced">pure</span>. The main purpose of +this function is, given any value in a context and new value, wrap the new value in a minimal context of the same +type as the first argument.</p></div> +<div class="paragraph"><p>Examples:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="mi">5</span><span class="p">)</span> <span class="c1">;; => #<Just [5]></span> @@ -289,14 +288,14 @@ <h3 id="_applicative_functor">Applicative Functor</h3> <span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nb">right </span><span class="ss">:foo</span><span class="p">)</span> <span class="ss">:bar</span><span class="p">)</span> <span class="c1">;; => #<Either [:bar :right]></span> </pre></div></div></div> -<div class="paragraph"><p>The real purpose of this function you will see when using a <strong>Monad</strong> abstraction.</p></div> +<div class="paragraph"><p>You will understand the real purpose of this function when using a <strong>Monad</strong> abstraction.</p></div> </div> <div class="sect2"> <h3 id="_monad">Monad</h3> <div class="paragraph"><p>Monads are the most discussed programming concept to come from category theory. Like functors and applicatives, monads deal with data in contexts.</p></div> <div class="paragraph"><p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and -put new value in a completely different context.</p></div> +put new values in a completely different context.</p></div> <div class="listingblock"> <div class="title">Monad protocol</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Monad</span> @@ -308,25 +307,24 @@ <h3 id="_monad">Monad</h3> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">In diference with haskel type class, <em>cats</em> protocol only defines one method: <span class="monospaced">bind</span>. Other -related methods like <span class="monospaced">return</span> are defined as auxiliar functions in <span class="monospaced">cats.core</span> namespace.</td> +<td class="content">As opposed to haskell type classes, <em>cats</em> protocols only define one method: <span class="monospaced">bind</span>. Other +related methods like <span class="monospaced">return</span> are defined as auxiliar functions in <span class="monospaced">cats.core</span>.</td> </tr></table> </div> <div class="paragraph"><p><span class="monospaced">bind</span> function, takes a monadic value (any container that implements a <span class="monospaced">Monad</span> protocol) and one -function, applies the function with unwrapped value as first parameter and return a result. In this -case, is a function respoisability of function wrap the result in a corresponding context.</p></div> -<div class="paragraph"><p>One of the key features of bind function, that everythig insined a monad context known the context -type. Having this, if you apply some computation over a monad and you want return the result -in the same container context but you don’t know that contaier is it, you can use <span class="monospaced">return</span> or <span class="monospaced">pure</span> -function for it.</p></div> +function, applies the function with unwrapped value as first parameter and returns a result. In this +case, the function is responsible for wrapping the result in a corresponding context.</p></div> +<div class="paragraph"><p>One of the key features of the bind function is that everything inside a monad context knows the context +type. Having this, if you apply some computation over a monad and you want to return the result +in the same container context but you don’t know that container is it, you can use <span class="monospaced">return</span> or <span class="monospaced">pure</span>.</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">bind</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">v</span><span class="p">]</span> <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">inc </span><span class="nv">v</span><span class="p">))))</span> <span class="c1">;; => #<Just [2]></span> </pre></div></div></div> -<div class="paragraph"><p><span class="monospaced">return</span> or <span class="monospaced">pure</span> function with one argument, try takes a context value from dynamic scope collected -internaly by <span class="monospaced">bind</span> function, so that, you can not use them with one argument out of <span class="monospaced">bind</span> context.</p></div> -<div class="paragraph"><p>And finally, for make more powerful monadic compositions, <em>cats</em> comes with <span class="monospaced">mlet</span> macro that -if you coming from haskell, represents a <span class="monospaced">do-syntax</span>:</p></div> +<div class="paragraph"><p>The <span class="monospaced">return</span> or <span class="monospaced">pure</span> functions, when called with one argument, try to use the dynamic scope context value +that’s set internaly by the <span class="monospaced">bind</span> function. Therefore you can’t use them with one argument out of a <span class="monospaced">bind</span> context.</p></div> +<div class="paragraph"><p>And finally, to make more powerful monadic compositions, <em>cats</em> comes with the <span class="monospaced">mlet</span> macro that +if you are coming from haskell, represents a <span class="monospaced">do-syntax</span>:</p></div> <div class="listingblock"> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> @@ -415,7 +413,7 @@ <h2 id="_data_types_reference">Data Types reference</h2> wraps an other value inside.</p></div> <div class="sect2"> <h3 id="_maybe">Maybe</h3> -<div class="paragraph"><p>This is one of the two most used monad types (commonly named Optional on not functional programming +<div class="paragraph"><p>This is one of the two most used monad types (commonly named Optional in non-functional programming languages).</p></div> <div class="paragraph"><p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is used as the return type of functions which may or may not return a meaningful value when they @@ -452,9 +450,9 @@ <h3 id="_maybe">Maybe</h3> </div> <div class="sect2"> <h3 id="_either">Either</h3> -<div class="paragraph"><p>Either is an other type that represents a result of computation, but in contrast with maybe -it can return something with failed computation result.</p></div> -<div class="paragraph"><p>In <em>cats</em> library it has two constructors:</p></div> +<div class="paragraph"><p>Either is another type that represents a result of computation, but in contrast with maybe +it can return some data with a failed computation result.</p></div> +<div class="paragraph"><p>In <em>cats</em> it has two constructors:</p></div> <div class="ulist"><ul> <li> <p> @@ -490,16 +488,16 @@ <h3 id="_either">Either</h3> <div class="sect1"> <h2 id="_clojure_types">Clojure Types</h2> <div class="sectionbody"> -<div class="paragraph"><p>Besides the own types, some colojure types has implementations for previously explained +<div class="paragraph"><p>Besides the own types, some clojure types has implementations for previously explained category theory abstractions.</p></div> <div class="admonitionblock"> <table><tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">With contrast with other similar libraries in clojure, <em>cats</em> not intends extend clojure types -that not acts like containers. As example, clojure keywords are values but can not be containers, so -that, their should not extend previously explained protocols.</td> +<td class="content">In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types +that don’t act like containers. For example, clojure keywords are values but can not be containers so +they should not extend any of the previously explained protocols.</td> </tr></table> </div> <table class="tableblock frame-all grid-all" @@ -537,14 +535,14 @@ <h2 id="_clojure_types">Clojure Types</h2> </div> </div> <div class="sect1"> -<h2 id="_special_use_case_of_monads">Special use case of monads</h2> +<h2 id="_special_use_cases_of_monads">Special use cases of monads</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_state_monad">State monad</h3> -<div class="paragraph"><p>State monad in one of the special use case of mode most used in haskell. It has different -purposes including: lazy computation composition, mantain state without state.</p></div> -<div class="paragraph"><p>The de facto monadic type of state monad is a plain function. Function represents a computation -as is (without executig it). Obviously, a function should have some special characteristics for work +<div class="paragraph"><p>State monad in one of the special use cases of monads most used in haskell. It has different +purposes including: lazy computation composition and maintaining state without explicit state.</p></div> +<div class="paragraph"><p>The de facto monadic type of the state monad is a plain function. Function represents a computation +as is (without executing it). Obviously, a function should have some special characteristics to work in monad state composition.</p></div> <div class="listingblock"> <div class="title">Valid function for valid state monad</div> @@ -556,9 +554,9 @@ <h3 id="_state_monad">State monad</h3> <span class="nv">newstate</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">)]</span> <span class="p">[</span><span class="nv">newvalue</span> <span class="nv">newstate</span><span class="p">]))</span> </pre></div></div></div> -<div class="paragraph"><p>Right, you just see an example of the low level primitive of state monad but for basic usage -you do not need build your own functions, just use some helpers that <em>cats</em> library gives you.</p></div> -<div class="paragraph"><p>Let see one example before explaining anything:</p></div> +<div class="paragraph"><p>Right, you just saw an example of the low level primitive of state monad but for basic usage +you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p></div> +<div class="paragraph"><p>Let’s look at one example before explaining the details:</p></div> <div class="listingblock"> <div class="title">Lazy composition of computations</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/mlet</span> <span class="p">[</span><span class="nv">state</span> <span class="p">(</span><span class="nf">m/get-state</span><span class="p">)</span> @@ -566,15 +564,15 @@ <h3 id="_state_monad">State monad</h3> <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)))</span> <span class="c1">;;=> #<State cats.types.State@2eebabb6></span> </pre></div></div></div> -<div class="paragraph"><p>At the momment of evaluating the previous expression, anything that we have defined -is executed. Instead of it, a strange/unknown object is returned of type <strong>State</strong>.</p></div> -<div class="paragraph"><p>State is a simple wrapper for clojure function, nothing more.</p></div> +<div class="paragraph"><p>At the moment of evaluating the previous expression, anything that we have defined +is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p></div> +<div class="paragraph"><p>State is a simple wrapper for clojure functions, nothing more.</p></div> <div class="paragraph"><p>Now, it time to execute the composed computation, for this we can use one of the following functions exposed by <em>cats</em>: <span class="monospaced">run-state</span>, <span class="monospaced">eval-state</span> and <span class="monospaced">exec-state</span>.</p></div> <div class="ulist"><ul> <li> <p> -<span class="monospaced">run-state</span> function executes the composed computation and return both, the value and the +<span class="monospaced">run-state</span> function executes the composed computation and returns both the value and the result state. </p> </li> @@ -592,7 +590,7 @@ <h3 id="_state_monad">State monad</h3> </li> </ul></div> <div class="listingblock"> -<div class="title">This is happens when we execute these three functions over previously generated <span class="monospaced">State</span> instance</div> +<div class="title">This is what happens when we execute these three functions over previously generated <span class="monospaced">State</span> instance</div> <div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/run-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> <span class="c1">;;=> #<Pair [1 (2 3)]></span> <span class="p">(</span><span class="nf">m/eval-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> @@ -606,12 +604,12 @@ <h3 id="_state_monad">State monad</h3> <div class="title">Note</div> </td> <td class="content">the pair instance returned by <span class="monospaced">run-state</span> functions works like any other seq of clojure, with -difference that pair only can have two slots.</td> +the difference that pairs can only have two slots.</td> </tr></table> </div> -<div class="paragraph"><p>This is a very basic example of state monad, it has a lot of use cases and explaining all them +<div class="paragraph"><p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them seems out of the scope of this document.</p></div> -<div class="paragraph"><p>However, if you have better example for explain state monad, documentation for an other monad or +<div class="paragraph"><p>However, if you have better examples to explain the state monad, documentation for another monad or any other contribution is always welcome.</p></div> </div> </div> @@ -653,7 +651,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-09 20:11:55 CEST +Last updated 2014-07-09 23:26:33 CEST </div> </div> </body> From 94a775066203e7ef387c04eaf899d45b85b5af49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Thu, 10 Jul 2014 08:09:47 +0000 Subject: [PATCH 18/52] Update doc --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index a798e26..f882ff4 100644 --- a/index.html +++ b/index.html @@ -322,7 +322,7 @@ <h3 id="_monad">Monad</h3> <span class="c1">;; => #<Just [2]></span> </pre></div></div></div> <div class="paragraph"><p>The <span class="monospaced">return</span> or <span class="monospaced">pure</span> functions, when called with one argument, try to use the dynamic scope context value -that’s set internaly by the <span class="monospaced">bind</span> function. Therefore you can’t use them with one argument out of a <span class="monospaced">bind</span> context.</p></div> +that’s set internally by the <span class="monospaced">bind</span> function. Therefore you can’t use them with one argument out of a <span class="monospaced">bind</span> context.</p></div> <div class="paragraph"><p>And finally, to make more powerful monadic compositions, <em>cats</em> comes with the <span class="monospaced">mlet</span> macro that if you are coming from haskell, represents a <span class="monospaced">do-syntax</span>:</p></div> <div class="listingblock"> @@ -651,7 +651,7 @@ <h2 id="_license">License</h2> <div id="footer"> <div id="footer-text"> Version 0.1.0<br> -Last updated 2014-07-09 23:26:33 CEST +Last updated 2014-07-10 08:09:19 UTC </div> </div> </body> From a4c87566e2538d77644ed8745e73dfdf8677b514 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Wed, 16 Jul 2014 20:40:05 +0200 Subject: [PATCH 19/52] Update dev doc --- codox-dev/cats.builtin.html | 3 + codox-dev/cats.core.html | 101 ++++ codox-dev/cats.monad.continuation.html | 6 + codox-dev/cats.monad.either.html | 7 + codox-dev/cats.monad.html | 2 + codox-dev/cats.monad.identity.html | 4 + codox-dev/cats.monad.maybe.html | 12 + codox-dev/cats.monad.reader.html | 2 + codox-dev/cats.monad.state.html | 32 ++ codox-dev/cats.monad.writer.html | 2 + codox-dev/cats.protocols.html | 13 + codox-dev/cats.types.html | 25 + codox-dev/css/default.css | 445 +++++++++++++++++ codox-dev/index.html | 2 + codox-dev/js/jquery.min.js | 4 + codox-dev/js/page_effects.js | 99 ++++ index-dev.html | 660 +++++++++++++++++++++++++ 17 files changed, 1419 insertions(+) create mode 100644 codox-dev/cats.builtin.html create mode 100644 codox-dev/cats.core.html create mode 100644 codox-dev/cats.monad.continuation.html create mode 100644 codox-dev/cats.monad.either.html create mode 100644 codox-dev/cats.monad.html create mode 100644 codox-dev/cats.monad.identity.html create mode 100644 codox-dev/cats.monad.maybe.html create mode 100644 codox-dev/cats.monad.reader.html create mode 100644 codox-dev/cats.monad.state.html create mode 100644 codox-dev/cats.monad.writer.html create mode 100644 codox-dev/cats.protocols.html create mode 100644 codox-dev/cats.types.html create mode 100644 codox-dev/css/default.css create mode 100644 codox-dev/index.html create mode 100644 codox-dev/js/jquery.min.js create mode 100644 codox-dev/js/page_effects.js create mode 100644 index-dev.html diff --git a/codox-dev/cats.builtin.html b/codox-dev/cats.builtin.html new file mode 100644 index 0000000..8e3ac66 --- /dev/null +++ b/codox-dev/cats.builtin.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.core.html b/codox-dev/cats.core.html new file mode 100644 index 0000000..628a5e5 --- /dev/null +++ b/codox-dev/cats.core.html @@ -0,0 +1,101 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-*forced-context*"><div class="inner"><span>*forced-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-*forced-context*"><h3>*forced-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. +</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. +Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the +arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. +</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, +ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. + +Example: + (>>= (just 1) (comp just inc) (comp just inc)) + ;=> #<Just [3]> +</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, +applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside +av's context, applies the function to value and return +a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, +returning the identity element when the predicate yields false. + +Otherwise, returns the instance unchanged. + + (require '[cats.monad.moaybe :as maybe]) + (require '[cats.core :as m]) + + (m/filter (partial < 2) (maybe/just 3)) + ;=> <Just [3]> + + (m/filter (partial < 4) (maybe/just 3)) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. + +(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(m/forseq [2 3] maybe/just) +;=> <Just [[2 3]]> + +(m/forseq [1 2] + (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing)))) +;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value +of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a +monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (def monad+ (m/lift-m 2 +)) + + (monad+ (maybe/just 1) (maybe/just 2)) + ;=> <Just [3]> + + (monad+ (maybe/just 1) (maybe/nothing)) + ;=> <Nothing> + + (monad+ [0 2 4] [1 2]) + ;=> [1 2 3 4 5 6] +</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a +monadic context, map it into the given collection +calling sequence on the results. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/mapseq maybe/just [2 3]) + ;=> <Just [[2 3]]> + + (m/mapseq (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing))) + [1 2]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +default/effect free context. + +This is multiarity function that with arity pure/1 +it uses the dynamic scope to resolve the current +context. With pure/2, you can force a specific context +value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect +their values in a vector returned in the monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/sequence [(maybe/just 2) (maybe/just 3)]) + ;=> <Just [[2, 3]]> + + (m/sequence [(maybe/nothing) (maybe/just 3)]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.continuation.html b/codox-dev/cats.monad.continuation.html new file mode 100644 index 0000000..d8d4d22 --- /dev/null +++ b/codox-dev/cats.monad.continuation.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. +</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.either.html b/codox-dev/cats.monad.either.html new file mode 100644 index 0000000..72d1d1d --- /dev/null +++ b/codox-dev/cats.monad.either.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-trans"><div class="inner"><span>either-trans</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +</pre></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Either. +</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-trans"><h3>either-trans</h3><div class="usage"><code>(either-trans inner-m)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.html b/codox-dev/cats.monad.html new file mode 100644 index 0000000..29a8c59 --- /dev/null +++ b/codox-dev/cats.monad.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.identity.html b/codox-dev/cats.monad.identity.html new file mode 100644 index 0000000..bbfeda9 --- /dev/null +++ b/codox-dev/cats.monad.identity.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. +</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.maybe.html b/codox-dev/cats.monad.maybe.html new file mode 100644 index 0000000..2ef10a8 --- /dev/null +++ b/codox-dev/cats.monad.maybe.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-trans"><div class="inner"><span>maybe-trans</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. +</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. + +Examples: + (from-maybe (just 1)) + ;=> 1 + (from-maybe (nothing)) + ;=> nil +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-trans"><h3>maybe-trans</h3><div class="usage"><code>(maybe-trans inner-m)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.reader.html b/codox-dev/cats.monad.reader.html new file mode 100644 index 0000000..c61e89a --- /dev/null +++ b/codox-dev/cats.monad.reader.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.state.html b/codox-dev/cats.monad.state.html new file mode 100644 index 0000000..ccfb4ea --- /dev/null +++ b/codox-dev/cats.monad.state.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.Pair. +</pre></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. +</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +value, ignoring the state. +Equivalent to taking the first value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +state. +Equivalent to taking the second value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns +the current state.</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces +the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and returns a Pair +instance with result and new state. + + (def computation (mlet [x (get-state) + y (put-state (inc x))] + (return y))) + + (def initial-state 1) + (run-state computation initial-state) + +This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function +to State class instance. +State class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the +specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.writer.html b/codox-dev/cats.monad.writer.html new file mode 100644 index 0000000..5815e69 --- /dev/null +++ b/codox-dev/cats.monad.writer.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.protocols.html b/codox-dev/cats.protocols.html new file mode 100644 index 0000000..acd9a39 --- /dev/null +++ b/codox-dev/cats.protocols.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) +inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts +the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the inner monad of this transformer. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad to the outher monad. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. +</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.types.html b/codox-dev/cats.types.html new file mode 100644 index 0000000..0c566d3 --- /dev/null +++ b/codox-dev/cats.types.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><div class="doc"><pre class="plaintext">Monadic types definition. +</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Continuation. +</pre></div></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Either. +</pre></div></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Just. +</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Nothing. +</pre></div></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Pair. +</pre></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.State. +</pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. + +Examples: + (from-maybe (just 1)) + ;=> 1 + (from-maybe (nothing)) + ;=> nil +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function +to State class instance. +State class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +State type.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/css/default.css b/codox-dev/css/default.css new file mode 100644 index 0000000..81cb803 --- /dev/null +++ b/codox-dev/css/default.css @@ -0,0 +1,445 @@ +body { + font-family: Helvetica, Arial, sans-serif; + font-size: 15px; +} + +pre, code { + font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; + font-size: 9pt; + margin: 15px 0; +} + +h2 { + font-weight: normal; + font-size: 28px; + padding: 10px 0 2px 0; + margin: 0; +} + +#header, #content, .sidebar { + position: fixed; +} + +#header { + top: 0; + left: 0; + right: 0; + height: 20px; + background: #444; + color: #fff; + padding: 5px 7px; +} + +#content { + top: 30px; + right: 0; + bottom: 0; + overflow: auto; + background: #fff; + color: #333; + padding: 0 18px; +} + +.sidebar { + position: fixed; + top: 30px; + bottom: 0; + overflow: auto; +} + +#namespaces { + background: #e2e2e2; + border-right: solid 1px #cccccc; + left: 0; + width: 250px; +} + +#vars { + background: #f2f2f2; + border-right: solid 1px #cccccc; + left: 251px; + width: 200px; +} + +.namespace-index { + left: 251px; +} + +.namespace-docs { + left: 452px; +} + +#header { + background: -moz-linear-gradient(top, #555 0%, #222 100%); + background: -webkit-linear-gradient(top, #555 0%, #333 100%); + background: -o-linear-gradient(top, #555 0%, #222 100%); + background: -ms-linear-gradient(top, #555 0%, #222 100%); + background: linear-gradient(top, #555 0%, #222 100%); + box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); + z-index: 100; +} + +#header h1 { + margin: 0; + padding: 0; + font-size: 12pt; + font-weight: lighter; + text-shadow: -1px -1px 0px #333; +} + +#header a, .sidebar a { + display: block; + text-decoration: none; +} + +#header a { + color: #fff; +} + +.sidebar a { + color: #333; +} + +#header h2 { + float: right; + font-size: 9pt; + font-weight: normal; + margin: 3px 3px; + padding: 0; + color: #bbb; +} + +#header h2 a { + display: inline; +} + +.sidebar h3 { + margin: 0; + padding: 10px 10px 0 10px; + font-size: 19px; + font-weight: normal; +} + +.sidebar ul { + padding: 0.5em 0em; + margin: 0; +} + +.sidebar li { + display: block; + vertical-align: middle; +} + +.sidebar li a, .sidebar li .no-link { + border-left: 3px solid transparent; + padding: 0 7px; + white-space: nowrap; +} + +.sidebar li .no-link { + display: block; + color: #777; + font-style: italic; +} + +.sidebar li .inner { + display: inline-block; + padding-top: 7px; + height: 24px; +} + +.sidebar li a, .sidebar li .tree { + height: 31px; +} + +.depth-1 .inner { padding-left: 2px; } +.depth-2 .inner { padding-left: 6px; } +.depth-3 .inner { padding-left: 20px; } +.depth-4 .inner { padding-left: 34px; } +.depth-5 .inner { padding-left: 48px; } +.depth-6 .inner { padding-left: 62px; } + +.sidebar li .tree { + display: block; + float: left; + position: relative; + top: -10px; + margin: 0 4px 0 0; + padding: 0; +} + +.sidebar li.depth-1 .tree { + display: none; +} + +.sidebar li .tree .top, .sidebar li .tree .bottom { + display: block; + margin: 0; + padding: 0; + width: 7px; +} + +.sidebar li .tree .top { + border-left: 1px solid #aaa; + border-bottom: 1px solid #aaa; + height: 19px; +} + +.sidebar li .tree .bottom { + height: 22px; +} + +.sidebar li.branch .tree .bottom { + border-left: 1px solid #aaa; +} + +#namespaces li.current a { + border-left: 3px solid #a33; + color: #a33; +} + +#vars li.current a { + border-left: 3px solid #33a; + color: #33a; +} + +#content h3 { + font-size: 13pt; + font-weight: bold; +} + +.public h3 { + margin: 0; + float: left; +} + +.usage { + clear: both; +} + +.public { + padding-top: 12px; + margin-top: 15px; + margin-bottom: 28px; +} + +.public:last-child { + margin-bottom: 20%; +} + +.members .public:last-child { + margin-bottom: 0; +} + +.members { + margin: 15px 0; +} + +.members h4 { + color: #555; + font-weight: normal; + font-variant: small-caps; + margin: 0 0 5px 0; +} + +.members .inner { + padding-top: 5px; + padding-left: 15px; + margin-top: 2px; + margin-left: 4px; + border-left: 1px solid #bbb; +} + +#content .members .inner h3 { + font-size: 12pt; +} + +.members .public { + margin-top: 0; + margin-bottom: 1em; + padding-top: 6px; +} + +.members .public:first-child { + padding-top: 0; +} + +.public h4.type, +.public h4.dynamic, +.public h4.added, +.public h4.deprecated { + margin: 0; + float: left; + font-variant: small-caps; + font-size: 13px; + font-weight: bold; + margin-top: 3px; + margin-left: 10px; +} + +.members h4.type, +.members h4.added, +.members h4.deprecated { + margin-top: 1px; +} + +h4.type { + color: #717171; +} + +h4.dynamic { + color: #9933aa; +} + +h4.added { + color: #508820; +} + +h4.deprecated { + color: #880000; +} + +.namespace { + margin-bottom: 30px; +} + +.namespace:last-child { + margin-bottom: 10%; +} + +.index { + padding: 0; + font-size: 80%; + margin: 15px 0; + line-height: 16px; +} + +.index * { + display: inline; +} + +.index p { + padding-right: 3px; +} + +.index li { + padding-right: 5px; +} + +.index ul { + padding-left: 0; +} + +.usage code { + display: block; + color: #008; + margin: 2px 0; +} + +.usage code:first-child { + padding-top: 10px; +} + +p { + margin: 15px 0; +} + +.public p:first-child, .public pre.plaintext { + margin-top: 12px; +} + +.doc { + margin: 0; +} + +.namespace-index .doc { + margin-bottom: 20px; +} + +.namespace-index .namespace .doc { + margin-bottom: 10px; +} + +.markdown { + line-height: 18px; + font-size: 14px; +} + +.markdown, .namespace .index { + max-width: 680px; + overflow-x: visible; +} + +.namespace-docs .markdown { + padding-bottom: 15px; +} + +.markdown p:last-child { + margin-bottom: 0; +} + +.markdown code, .src-link a { + background: #f6f6f6; + border: 1px solid #e4e4e4; + border-radius: 2px; +} + +.markdown pre { + background: #f4f4f4; + border: 1px solid #e0e0e0; + border-radius: 2px; + padding: 5px 10px; + margin: 0 10px; +} + +.markdown pre code { + background: transparent; + border: none; +} + +.doc ul, .doc ol { + padding-left: 30px; +} + +.doc table { + border-collapse: collapse; + margin: 0 10px; +} + +.doc table td, .doc table th { + border: 1px solid #dddddd; + padding: 4px 6px; +} + +.doc table th { + background: #f2f2f2; +} + +.doc dl { + margin: 0 10px 20px 10px; +} + +.doc dl dt { + font-weight: bold; + margin: 0; + padding: 3px 0; + border-bottom: 1px solid #ddd; +} + +.doc dl dd { + padding: 5px 0; + margin: 0 0 5px 10px; +} + +.doc abbr { + border-bottom: 1px dotted #333; + font-variant: none + cursor: help; +} + +.src-link a { + font-size: 70%; + padding: 1px 4px; + text-decoration: none; + color: #5555bb; +} \ No newline at end of file diff --git a/codox-dev/index.html b/codox-dev/index.html new file mode 100644 index 0000000..f6c7e28 --- /dev/null +++ b/codox-dev/index.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-*forced-context*">*forced-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3EEither">->Either</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-trans">either-trans</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-trans">maybe-trans</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-pair">pair</a> </li><li> <a href="cats.monad.state.html#var-pair.3F">pair?</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/js/jquery.min.js b/codox-dev/js/jquery.min.js new file mode 100644 index 0000000..73f33fb --- /dev/null +++ b/codox-dev/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/codox-dev/js/page_effects.js b/codox-dev/js/page_effects.js new file mode 100644 index 0000000..ef8120d --- /dev/null +++ b/codox-dev/js/page_effects.js @@ -0,0 +1,99 @@ +function visibleInParent(element) { + var position = $(element).position().top + return position > -50 && position < ($(element).offsetParent().height() - 50) +} + +function hasFragment(link, fragment) { + return $(link).attr("href").indexOf("#" + fragment) != -1 +} + +function findLinkByFragment(elements, fragment) { + return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() +} + +function scrollToCurrentVarLink(elements) { + var elements = $(elements); + var parent = elements.offsetParent(); + + if (elements.length == 0) return; + + var top = elements.first().position().top; + var bottom = elements.last().position().top + elements.last().height(); + + if (top >= 0 && bottom <= parent.height()) return; + + if (top < 0) { + parent.scrollTop(parent.scrollTop() + top); + } + else if (bottom > parent.height()) { + parent.scrollTop(parent.scrollTop() + bottom - parent.height()); + } +} + +function setCurrentVarLink() { + $('#vars a').parent().removeClass('current') + $('.anchor'). + filter(function(index) { return visibleInParent(this) }). + each(function(index, element) { + findLinkByFragment("#vars a", element.id). + parent(). + addClass('current') + }); + scrollToCurrentVarLink('#vars .current'); +} + +var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) + +function scrollPositionId(element) { + var directory = window.location.href.replace(/[^\/]+\.html$/, '') + return 'scroll::' + $(element).attr('id') + '::' + directory +} + +function storeScrollPosition(element) { + if (!hasStorage) return; + localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) + localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) +} + +function recallScrollPosition(element) { + if (!hasStorage) return; + $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) + $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) +} + +function persistScrollPosition(element) { + recallScrollPosition(element) + $(element).scroll(function() { storeScrollPosition(element) }) +} + +function sidebarContentWidth(element) { + var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) + return Math.max.apply(Math, widths) +} + +function resizeSidebars() { + var nsWidth = sidebarContentWidth('#namespaces') + 30 + var varWidth = 0 + + if ($('#vars').length != 0) { + varWidth = sidebarContentWidth('#vars') + 30 + } + + // snap to grid + var snap = 30; + nsWidth = Math.ceil(nsWidth / snap) * snap; + varWidth = Math.ceil(varWidth / snap) * snap; + + $('#namespaces').css('width', nsWidth) + $('#vars').css('width', varWidth) + $('#vars, .namespace-index').css('left', nsWidth + 1) + $('.namespace-docs').css('left', nsWidth + varWidth + 2) +} + +$(window).ready(resizeSidebars) +$(window).ready(setCurrentVarLink) +$(window).ready(function() { persistScrollPosition('#namespaces')}) +$(window).ready(function() { + $('#content').scroll(setCurrentVarLink) + $(window).resize(setCurrentVarLink) +}) diff --git a/index-dev.html b/index-dev.html new file mode 100644 index 0000000..61f8ab2 --- /dev/null +++ b/index-dev.html @@ -0,0 +1,660 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<meta name="generator" content="AsciiDoc 8.6.9"> +<title>Category Theory abstractions for Clojure</title> +<link rel="stylesheet" href="static/niwi.css" type="text/css"> +<link rel="stylesheet" href="static/pygments.css" type="text/css"> + + +<script type="text/javascript" src="static/asciidoc.js"></script> +<script type="text/javascript" src="static/niwi.js"></script> +<script type="text/javascript"> +/*<![CDATA[*/ +asciidoc.install(2); +/*]]>*/ +</script> +</head> +<body class="article" style="max-width:960px"> +<div id="header"> +<h1>Category Theory abstractions for Clojure</h1> +<span id="author">Andrey Antukh & Alejandro Gómez</span><br> +<span id="revnumber">version 0.2.0,</span> +<span id="revdate">2014-07-15</span> +<div id="toc"> + <div id="toctitle">Table of Contents</div> + <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript> +</div> +</div> +<div id="content"> +<div id="preamble"> +<div class="sectionbody"> +<div class="paragraph"><p><span class="image"> +<img src="static/logo/logo.png" alt="cats logo"> +</span></p></div> +</div> +</div> +<div class="sect1"> +<h2 id="_introduction">Introduction</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Category Theory abstractions for Clojure.</p></div> +<div class="sect2"> +<h3 id="_philosophy">Philosophy</h3> +<div class="paragraph"><p>Four most important rules:</p></div> +<div class="ulist"><ul> +<li> +<p> +Beautiful is better than ugly +</p> +</li> +<li> +<p> +Explicit is better than implicit +</p> +</li> +<li> +<p> +Simple is better than complex +</p> +</li> +<li> +<p> +Readability counts +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_why_another_library">Why another library?</h3> +<div class="paragraph"><p>Because cats library:</p></div> +<div class="ulist"><ul> +<li> +<p> +targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong> +</p> +</li> +<li> +<p> +aims to have the most simple implementation for supported abstractions. +</p> +</li> +<li> +<p> +aims to have more abstractions that are simple monads. +</p> +</li> +<li> +<p> +has documentation as first class citizen. +</p> +</li> +<li> +<p> +licensed under a permissive license (compared to other libraries): BSD (2-Clause) +</p> +</li> +</ul></div> +<div class="paragraph"><p>This is an incomplete list of differences with other existing libraries:</p></div> +<div class="ulist"><ul> +<li> +<p> +The official monads library <span class="monospaced">algo.monads</span> is very good, but its approach for modeling + is slighty limited (e.g. you always need to specify what monad you want use instead of + relying on the type). And obviously because it only has monads. +</p> +</li> +<li> +<p> +Fluokitten is the best library that we found, but the future of it is uncertain. One big + difference with fluokitten is that <span class="monospaced">cats</span> doesn’t aim to extend every clojure type + with monadic protocols, for the obvious reason that monad; functor and applicative represents + context/wrapper types and it doesn’t make sense to implement Functor protocol for <span class="monospaced">java.lang.String</span>. +</p> +</li> +<li> +<p> +<span class="monospaced">bwo/monads</span> is the last monads library. It is completely undocumented and its implementation + has much unnecesary complexity. +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_project_maturity">Project Maturity</h3> +<div class="paragraph"><p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> +breakage.</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_install">Install</h2> +<div class="sectionbody"> +<div class="paragraph"><p>This section covers installing <em>cats</em>.</p></div> +<div class="sect2"> +<h3 id="_requirements">Requirements</h3> +<div class="paragraph"><p><em>cats</em> supports:</p></div> +<div class="ulist"><ul> +<li> +<p> +JDK7 +</p> +</li> +<li> +<p> +JDK8 +</p> +</li> +</ul></div> +</div> +<div class="sect2"> +<h3 id="_leiningen">Leiningen</h3> +<div class="paragraph"><p>The simplest way to use <em>cats</em> in a Clojure project is by including +it as a dependency in your <strong><em>project.clj</em></strong>:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">[</span><span class="nv">cats</span> <span class="s">"0.2.0-SNAPSHOT"</span><span class="p">]</span> +</pre></div></div></div> +</div> +<div class="sect2"> +<h3 id="_maven">Maven</h3> +<div class="paragraph"><p>Also, you can use it with maven. First, add the clojars repository:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="nt"><repository></span> + <span class="nt"><id></span>clojars.org<span class="nt"></id></span> + <span class="nt"><url></span>http://clojars.org/repo<span class="nt"></url></span> +<span class="nt"></repository></span> +</pre></div></div></div> +<div class="paragraph"><p>Then for cats:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="nt"><dependency></span> + <span class="nt"><groupId></span>cats<span class="nt"></groupId></span> + <span class="nt"><artifactId></span>cats<span class="nt"></artifactId></span> + <span class="nt"><version></span>0.2.0-SNAPSHOT<span class="nt"></version></span> +<span class="nt"></dependency></span> +</pre></div></div></div> +</div> +<div class="sect2"> +<h3 id="_get_the_code">Get the Code</h3> +<div class="paragraph"><p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p></div> +<div class="paragraph"><p>You can clone the public repository with this command:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre>git clone https://github.com/niwibe/cats +</pre></div></div></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_abstractions">Abstractions</h2> +<div class="sectionbody"> +<div class="paragraph"><p>This section introduces almost all category theory abstractios that cats library +supports.</p></div> +<div class="paragraph"><p>And for it, we are using <em>Maybe</em> type for all examples beacuse that type implements +all protocols. You can read more about it in the next section.</p></div> +<div class="sect2"> +<h3 id="_functor">Functor</h3> +<div class="paragraph"><p>The Functor represents some sort of "computational context".</p></div> +<div class="listingblock"> +<div class="title">Functor protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Functor</span> + <span class="p">(</span><span class="nf">fmap</span> <span class="p">[</span><span class="nv">fv</span> <span class="nv">f</span><span class="p">]</span> + <span class="s">"Applies function f to the value(s) inside</span> +<span class="s"> the context of the functor fv."</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p><span class="monospaced">fmap</span> takes one wrapped value in functor context fv (ex: <span class="monospaced">Just 2</span>) and a plain function, +unwraps the value and applies a function to the plain value returning it wrapped in a new context +of <strong>the same type</strong> as the first argument.</p></div> +<div class="paragraph"><p>Some examples can explain it better:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.maybe</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> + +<span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> +<span class="c1">;; => #<Just [2]></span> +</pre></div></div></div> +<div class="paragraph"><p>Same example but applying function over <strong>Nothing</strong>:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +<div class="paragraph"><p>The real fmap signature is <span class="monospaced">(a -> b) -> f a -> f b</span> that can be translated to clojure <span class="monospaced">[f fv]</span>.</p></div> +<div class="paragraph"><p>The changed order of the protocol parameters definition is required because of clojure’s protocols +limitation that only allow dispatching on the first argument.</p></div> +<div class="paragraph"><p>You should never use a protocol function directly. Instead use <span class="monospaced">cats.core/fmap</span>. It has +the correct signature.</p></div> +<div class="paragraph"><p>All examples in this documentation uses <span class="monospaced">cats.core/fmap</span> instead of a function defined in the +protocol.</p></div> +</td> +</tr></table> +</div> +<div class="paragraph"><p>Some of the native clojure types, like Vector, also implements the Functor protocol and can +work like a functor context/container:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;; => [2 3 4]</span> +</pre></div></div></div> +<div class="paragraph"><p>The main difference compared to the previous example with default clojure map, is that the clojure +map works with seqs and doesn’t respect the input container:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nb">map inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;; => (2 3 4)</span> +</pre></div></div></div> +</div> +<div class="sect2"> +<h3 id="_applicative_functor">Applicative Functor</h3> +<div class="paragraph"><p>Represents an abstraction lying in between Functor and Monad in expressivity.</p></div> +<div class="listingblock"> +<div class="title">Applicative protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Applicative</span> + <span class="p">(</span><span class="nf">fapply</span> <span class="p">[</span><span class="nv">af</span> <span class="nv">av</span><span class="p">]</span> + <span class="s">"Applies the function(s) inside ag's context to the value(s)</span> +<span class="s"> inside av's context while preserving the context."</span><span class="p">)</span> + <span class="p">(</span><span class="nf">pure</span> <span class="p">[</span><span class="nv">ctx</span> <span class="nv">v</span><span class="p">]</span> + <span class="s">"Takes any context monadic value ctx and any value v, and puts</span> +<span class="s"> the value v in the most minimal context of the same type of ctx"</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p>With the same idea of data inside a context (like <span class="monospaced">Functor</span>), what happens if a wrapped value is +one function/computation? Applicative functors works like plain functors but additionally +can apply a function wrapped in some context similar to input value.</p></div> +<div class="paragraph"><p>Let see one example:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defn </span><span class="nv">make-greeter</span> + <span class="p">[</span><span class="o">^</span><span class="nv">String</span> <span class="nv">lang</span><span class="p">]</span> + <span class="p">(</span><span class="nf">condp</span> <span class="nb">= </span><span class="nv">lang</span> + <span class="s">"es"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hola "</span> <span class="nv">name</span><span class="p">)))</span> + <span class="s">"en"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hello "</span> <span class="nv">name</span><span class="p">)))</span> + <span class="p">(</span><span class="nf">nothing</span><span class="p">)))</span> + +<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"es"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> +<span class="c1">;; => #<Just [Hola Alex]></span> + +<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"en"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> +<span class="c1">;; => #<Just [Hello Alex]></span> + +<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"it"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +<div class="paragraph"><p>Moreover, the applicative functor protocol comes with another function: <span class="monospaced">pure</span>. The main purpose of +this function is, given any value in a context and new value, wrap the new value in a minimal context of the same +type as the first argument.</p></div> +<div class="paragraph"><p>Examples:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="mi">5</span><span class="p">)</span> +<span class="c1">;; => #<Just [5]></span> + +<span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nb">right </span><span class="ss">:foo</span><span class="p">)</span> <span class="ss">:bar</span><span class="p">)</span> +<span class="c1">;; => #<Either [:bar :right]></span> +</pre></div></div></div> +<div class="paragraph"><p>You will understand the real purpose of this function when using a <strong>Monad</strong> abstraction.</p></div> +</div> +<div class="sect2"> +<h3 id="_monad">Monad</h3> +<div class="paragraph"><p>Monads are the most discussed programming concept to come from category theory. Like functors and +applicatives, monads deal with data in contexts.</p></div> +<div class="paragraph"><p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and +put new values in a completely different context.</p></div> +<div class="listingblock"> +<div class="title">Monad protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Monad</span> + <span class="s">"Incomplete monad type definition."</span> + <span class="p">(</span><span class="nf">bind</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">f</span><span class="p">]</span> <span class="s">"Applies the function f to the value(s) inside mv's context."</span><span class="p">))</span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">As opposed to haskell type classes, <em>cats</em> protocols only define one method: <span class="monospaced">bind</span>. Other +related methods like <span class="monospaced">return</span> are defined as auxiliar functions in <span class="monospaced">cats.core</span>.</td> +</tr></table> +</div> +<div class="paragraph"><p><span class="monospaced">bind</span> function, takes a monadic value (any container that implements a <span class="monospaced">Monad</span> protocol) and one +function, applies the function with unwrapped value as first parameter and returns a result. In this +case, the function is responsible for wrapping the result in a corresponding context.</p></div> +<div class="paragraph"><p>One of the key features of the bind function is that everything inside a monad context knows the context +type. Having this, if you apply some computation over a monad and you want to return the result +in the same container context but you don’t know that container is it, you can use <span class="monospaced">return</span> or <span class="monospaced">pure</span>.</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">bind</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">v</span><span class="p">]</span> <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">inc </span><span class="nv">v</span><span class="p">))))</span> +<span class="c1">;; => #<Just [2]></span> +</pre></div></div></div> +<div class="paragraph"><p>The <span class="monospaced">return</span> or <span class="monospaced">pure</span> functions, when called with one argument, try to use the dynamic scope context value +that’s set internally by the <span class="monospaced">bind</span> function. Therefore you can’t use them with one argument out of a <span class="monospaced">bind</span> context.</p></div> +<div class="paragraph"><p>And finally, to make more powerful monadic compositions, <em>cats</em> comes with the <span class="monospaced">mlet</span> macro that +if you are coming from haskell, represents a <span class="monospaced">do-syntax</span>:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> + <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> + <span class="nv">z</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">))]</span> + <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> +<span class="c1">;; => #<Just [3]></span> +</pre></div></div></div> +<div class="paragraph"><p>If you want to use regular (non-monadic) let bindings inside a <span class="monospaced">mlet</span> block, you can do so using +<span class="monospaced">:let</span> and a bindings vector as a pair inside the mlet bindings:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> + <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> + <span class="ss">:let</span> <span class="p">[</span><span class="nv">z</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">)]]</span> + <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> +<span class="c1">;; => #<Just [3]></span> +</pre></div></div></div> +</div> +<div class="sect2"> +<h3 id="_monadzero">MonadZero</h3> +<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">MonadZero</a> protocol +represents a monad that has a notion of an identity element.</p></div> +<div class="listingblock"> +<div class="title">MonadZero protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadZero</span> + <span class="s">"A `Monad` that supports the notion of an identity element."</span> + <span class="p">(</span><span class="nf">mzero</span> <span class="p">[</span><span class="nv">ctx</span><span class="p">]</span> <span class="s">"The identity element for `ctx`."</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p>The <span class="monospaced">bind</span> operation on the identity element satisfies Left Zero:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> + +<span class="p">(</span><span class="nb">= </span><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> + <span class="p">(</span><span class="nf">>>=</span> <span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> <span class="nv">just</span><span class="p">))</span> +<span class="c1">;; => true</span> +</pre></div></div></div> +<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:when</span> clauses can be used in <span class="monospaced">mlet</span> +bindings:</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</span> + <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="p">(</span><span class="nf">return</span> <span class="nv">i</span><span class="p">))</span> +<span class="c1">;; => [3 4 5]</span> + +<span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">(</span><span class="nf">t/just</span> <span class="mi">2</span><span class="p">)</span> + <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> + <span class="p">(</span><span class="nf">m/return</span> <span class="nv">i</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +</div> +<div class="sect2"> +<h3 id="_monadplus">MonadPlus</h3> +<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadPlus">MonadPlus</a> protocol +represents a MonadZero wich has a plus operation.</p></div> +<div class="listingblock"> +<div class="title">MonadPlus protocol</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadPlus</span> + <span class="s">"A `MonadZero` that supports the notion of addition."</span> + <span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">mv</span><span class="o">'</span><span class="p">]</span> <span class="s">"An associative addition operation."</span><span class="p">))</span> +</pre></div></div></div> +<div class="paragraph"><p><span class="monospaced">mplus</span> is an associative binary operation for which the value that <span class="monospaced">mzero</span> gives is the identity +element. The <span class="monospaced">mplus</span> version contained in the core namespace is variadic.</p></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.maybe</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">just</span> <span class="nv">nothing</span><span class="p">]])</span> +<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">mplus</span><span class="p">]])</span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">]</span> <span class="p">[</span><span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span><span class="p">]</span> <span class="p">[</span><span class="mi">7</span> <span class="mi">8</span><span class="p">])</span> +<span class="c1">;; => [1 2 3 4 5 6 7 8]</span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> +<span class="c1">;; => #<Nothing ></span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">))</span> +<span class="c1">;; => #<Just [42]></span> + +<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">3</span><span class="p">))</span> +<span class="c1">;; => #<Just [42]></span> +</pre></div></div></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_data_types_reference">Data Types reference</h2> +<div class="sectionbody"> +<div class="paragraph"><p>We talked about values in a context, but that is a context? Context per se is any value that +wraps an other value inside.</p></div> +<div class="sect2"> +<h3 id="_maybe">Maybe</h3> +<div class="paragraph"><p>This is one of the two most used monad types (commonly named Optional in non-functional programming +languages).</p></div> +<div class="paragraph"><p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is +used as the return type of functions which may or may not return a meaningful value when they +are applied. It consists of either an empty constructor (called None or Nothing), or a constructor +encapsulating the original data type A (written Just A or Some A).</p></div> +<div class="paragraph"><p><em>cats</em>, implements two constructors:</p></div> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">(just v)</span>: represents just a value in a context. +</p> +</li> +<li> +<p> +<span class="monospaced">(nothing)</span>: represents a failure or null. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.maybe</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> +<span class="c1">;; => #<Just [1]></span> +<span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> +<span class="c1">;; => #<Nothing ></span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">Maybe types are: Functors, Applicative Functors and Monads</td> +</tr></table> +</div> +</div> +<div class="sect2"> +<h3 id="_either">Either</h3> +<div class="paragraph"><p>Either is another type that represents a result of computation, but in contrast with maybe +it can return some data with a failed computation result.</p></div> +<div class="paragraph"><p>In <em>cats</em> it has two constructors:</p></div> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">(left v)</span>: represents a failure. +</p> +</li> +<li> +<p> +<span class="monospaced">(right v)</span>: represents a successful result. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.either</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> + +<span class="p">(</span><span class="nb">right </span><span class="ss">:valid-value</span><span class="p">)</span> +<span class="c1">;; => #<Right [:valid-value :right]></span> + +<span class="p">(</span><span class="nb">left </span><span class="s">"Error message"</span><span class="p">)</span> +<span class="c1">;; => #<Either [Error message :left]></span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">Either is also (like Maybe) Functor, Applicative Functor and Monad.</td> +</tr></table> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_clojure_types">Clojure Types</h2> +<div class="sectionbody"> +<div class="paragraph"><p>Besides the own types, some clojure types has implementations for previously explained +category theory abstractions.</p></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types +that don’t act like containers. For example, clojure keywords are values but can not be containers so +they should not extend any of the previously explained protocols.</td> +</tr></table> +</div> +<table class="tableblock frame-all grid-all" +style=" +width:100%; +"> +<caption class="title">Table 1. Summary of clojure types and implemented protocols</caption> +<col style="width:50%;"> +<col style="width:50%;"> +<thead> +<tr> +<th class="tableblock halign-left valign-top" > Name </th> +<th class="tableblock halign-left valign-top" > Implemented protocols</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">vector</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">hash-set</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">list</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top" ><p class="tableblock">atom</p></td> +<td class="tableblock halign-left valign-top" ><p class="tableblock">No one (in future)</p></td> +</tr> +</tbody> +</table> +</div> +</div> +<div class="sect1"> +<h2 id="_special_use_cases_of_monads">Special use cases of monads</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_state_monad">State monad</h3> +<div class="paragraph"><p>State monad in one of the special use cases of monads most used in haskell. It has different +purposes including: lazy computation composition and maintaining state without explicit state.</p></div> +<div class="paragraph"><p>The de facto monadic type of the state monad is a plain function. Function represents a computation +as is (without executing it). Obviously, a function should have some special characteristics to work +in monad state composition.</p></div> +<div class="listingblock"> +<div class="title">Valid function for valid state monad</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">state</span><span class="p">]</span> + <span class="s">"Takes state as argument and return a vector</span> +<span class="s"> with first argument with procesed value and</span> +<span class="s"> second argument the transformed new state."</span> + <span class="p">(</span><span class="k">let </span><span class="p">[</span><span class="nv">newvalue</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)</span> + <span class="nv">newstate</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">)]</span> + <span class="p">[</span><span class="nv">newvalue</span> <span class="nv">newstate</span><span class="p">]))</span> +</pre></div></div></div> +<div class="paragraph"><p>Right, you just saw an example of the low level primitive of state monad but for basic usage +you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p></div> +<div class="paragraph"><p>Let’s look at one example before explaining the details:</p></div> +<div class="listingblock"> +<div class="title">Lazy composition of computations</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/mlet</span> <span class="p">[</span><span class="nv">state</span> <span class="p">(</span><span class="nf">m/get-state</span><span class="p">)</span> + <span class="nv">_</span> <span class="p">(</span><span class="nf">m/put-state</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">))]</span> + <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)))</span> +<span class="c1">;;=> #<State cats.monad.state.State@2eebabb6></span> +</pre></div></div></div> +<div class="paragraph"><p>At the moment of evaluating the previous expression, anything that we have defined +is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p></div> +<div class="paragraph"><p>State is a simple wrapper for clojure functions, nothing more.</p></div> +<div class="paragraph"><p>Now, it time to execute the composed computation, for this we can use one of the following +functions exposed by <em>cats</em>: <span class="monospaced">run-state</span>, <span class="monospaced">eval-state</span> and <span class="monospaced">exec-state</span>.</p></div> +<div class="ulist"><ul> +<li> +<p> +<span class="monospaced">run-state</span> function executes the composed computation and returns both the value and the + result state. +</p> +</li> +<li> +<p> +<span class="monospaced">eval-state</span> function executes the composed computation and returns the resulting value + discarding the state. +</p> +</li> +<li> +<p> +<span class="monospaced">exec-state</span> function executes the composed computation and return only the resulting + state, ignoring the resulting value. +</p> +</li> +</ul></div> +<div class="listingblock"> +<div class="title">This is what happens when we execute these three functions over previously generated <span class="monospaced">State</span> instance</div> +<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/run-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;;=> #<Pair [1 (2 3)]></span> +<span class="p">(</span><span class="nf">m/eval-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;;=> 1</span> +<span class="p">(</span><span class="nf">m/exec-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> +<span class="c1">;;=> (2 3)</span> +</pre></div></div></div> +<div class="admonitionblock"> +<table><tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content">the pair instance returned by <span class="monospaced">run-state</span> functions works like any other seq of clojure, with +the difference that pairs can only have two slots.</td> +</tr></table> +</div> +<div class="paragraph"><p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them +seems out of the scope of this document.</p></div> +<div class="paragraph"><p>However, if you have better examples to explain the state monad, documentation for another monad or +any other contribution is always welcome.</p></div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_license">License</h2> +<div class="sectionbody"> +<div class="listingblock"> +<div class="content"><div class="highlight"><pre>Copyright (c) 2014, Andrey Antukh +Copyright (c) 2014, Alejandro Gómez + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +</pre></div></div></div> +</div> +</div> +</div> +<div id="footnotes"><hr></div> +<div id="footer"> +<div id="footer-text"> +Version 0.2.0<br> +Last updated 2014-07-16 20:38:54 CEST +</div> +</div> +</body> +</html> From cd3e46874c6a2185fd5b533d33e6af77f988dd9c Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 18 Oct 2014 20:48:24 +0200 Subject: [PATCH 20/52] Update dev doc --- codox-dev/cats.builtin.html | 2 +- codox-dev/cats.core.html | 49 +- codox-dev/cats.data.html | 4 + codox-dev/cats.monad.continuation.html | 2 +- codox-dev/cats.monad.either.html | 4 +- codox-dev/cats.monad.html | 2 +- codox-dev/cats.monad.identity.html | 5 +- codox-dev/cats.monad.lazy.html | 3 + codox-dev/cats.monad.maybe.html | 4 +- codox-dev/cats.monad.reader.html | 10 +- codox-dev/cats.monad.state.html | 11 +- codox-dev/cats.monad.writer.html | 3 +- codox-dev/cats.protocols.html | 23 +- codox-dev/cats.types.html | 25 - codox-dev/index.html | 2 +- index-dev.html | 1806 +++++++++++++++++------- logo.png | Bin 0 -> 5208 bytes 17 files changed, 1420 insertions(+), 535 deletions(-) create mode 100644 codox-dev/cats.data.html create mode 100644 codox-dev/cats.monad.lazy.html delete mode 100644 codox-dev/cats.types.html create mode 100644 logo.png diff --git a/codox-dev/cats.builtin.html b/codox-dev/cats.builtin.html index 8e3ac66..08092b4 100644 --- a/codox-dev/cats.builtin.html +++ b/codox-dev/cats.builtin.html @@ -1,3 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. </pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.core.html b/codox-dev/cats.core.html index 628a5e5..d4c22a2 100644 --- a/codox-dev/cats.core.html +++ b/codox-dev/cats.core.html @@ -1,11 +1,11 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-*forced-context*"><div class="inner"><span>*forced-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-*forced-context*"><h3>*forced-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, +</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. Example: @@ -76,7 +76,46 @@ (maybe/nothing))) [1 2]) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure +let. This allows much easy composition of monadic +computations. + +Let see one example for understand how it works, this is +a code using bind for compose few number of operations: + + + (bind (just 1) + (fn [a] + (bind (just (inc a)) + (fn [b] + (return (* b 2)))))) + ;=> #<Just [4]> + +Now see how this code can be more clear if you +are using mlet macro for do it: + + (mlet [a (just 1) + b (just (inc a))] + (return (* b 2))) + ;=> #<Just [4]> +</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the +same as mlet but specifying the monadic context. +So, instead of writing: + + (with-monad (maybe-transformer vector-monad) + (mlet [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2)))) + ;=> [#<Just [4]> #<Just [6]>] + +You can just write: + + (mlet-with (maybe-transformer vector-monad) + [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2))) + ;=> [#<Just [4]> #<Just [6]>] +</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 @@ -98,4 +137,4 @@ Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.data.html b/codox-dev/cats.data.html new file mode 100644 index 0000000..e64cf36 --- /dev/null +++ b/codox-dev/cats.data.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. +</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.continuation.html b/codox-dev/cats.monad.continuation.html index d8d4d22..50d695a 100644 --- a/codox-dev/cats.monad.continuation.html +++ b/codox-dev/cats.monad.continuation.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. </pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. </pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. </pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the diff --git a/codox-dev/cats.monad.either.html b/codox-dev/cats.monad.either.html index 72d1d1d..df207f1 100644 --- a/codox-dev/cats.monad.either.html +++ b/codox-dev/cats.monad.either.html @@ -1,7 +1,7 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-trans"><div class="inner"><span>either-trans</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. </pre></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Either. -</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-trans"><h3>either-trans</h3><div class="usage"><code>(either-trans inner-m)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. </pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. </pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. </pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.html b/codox-dev/cats.monad.html index 29a8c59..4e3887d 100644 --- a/codox-dev/cats.monad.html +++ b/codox-dev/cats.monad.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.identity.html b/codox-dev/cats.monad.identity.html index bbfeda9..1211459 100644 --- a/codox-dev/cats.monad.identity.html +++ b/codox-dev/cats.monad.identity.html @@ -1,4 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. </pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. -</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. +</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.lazy.html b/codox-dev/cats.monad.lazy.html new file mode 100644 index 0000000..62fe1a7 --- /dev/null +++ b/codox-dev/cats.monad.lazy.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. +</pre></div><div class="public anchor" id="var-lazy-monad"><h3>lazy-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lazy-transformer"><h3>lazy-transformer</h3><div class="usage"><code>(lazy-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.maybe.html b/codox-dev/cats.monad.maybe.html index 2ef10a8..4ad35d7 100644 --- a/codox-dev/cats.monad.maybe.html +++ b/codox-dev/cats.monad.maybe.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-trans"><div class="inner"><span>maybe-trans</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. </pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. </pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. </pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. @@ -9,4 +9,4 @@ ;=> 1 (from-maybe (nothing)) ;=> nil -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-trans"><h3>maybe-trans</h3><div class="usage"><code>(maybe-trans inner-m)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.reader.html b/codox-dev/cats.monad.reader.html index c61e89a..dafedb8 100644 --- a/codox-dev/cats.monad.reader.html +++ b/codox-dev/cats.monad.reader.html @@ -1,2 +1,10 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. +</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function +to Reader class instance. +Reader class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the +wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.state.html b/codox-dev/cats.monad.state.html index ccfb4ea..f78008f 100644 --- a/codox-dev/cats.monad.state.html +++ b/codox-dev/cats.monad.state.html @@ -1,7 +1,6 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. -</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.Pair. -</pre></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. </pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. @@ -11,9 +10,9 @@ state. Equivalent to taking the second value of the pair instance returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces +the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and returns a Pair +wrapped computation and returns a cats.data.Pair instance with result and new state. (def computation (mlet [x (get-state) @@ -27,6 +26,6 @@ to State class instance. State class instance work as simple wrapper for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.writer.html b/codox-dev/cats.monad.writer.html index 5815e69..e1e5148 100644 --- a/codox-dev/cats.monad.writer.html +++ b/codox-dev/cats.monad.writer.html @@ -1,2 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. +</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.protocols.html b/codox-dev/cats.protocols.html index acd9a39..a53626d 100644 --- a/codox-dev/cats.protocols.html +++ b/codox-dev/cats.protocols.html @@ -1,13 +1,28 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. </pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. +</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. +</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. </pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. </pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the inner monad of this transformer. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad to the outher monad. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. +</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state +and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. +</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. +</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. +</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. +</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, +yield a writer which has the first element of the pair as the value and +the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. </pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. </pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. </pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.types.html b/codox-dev/cats.types.html deleted file mode 100644 index 0c566d3..0000000 --- a/codox-dev/cats.types.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><div class="doc"><pre class="plaintext">Monadic types definition. -</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Continuation. -</pre></div></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Either. -</pre></div></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Just. -</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Nothing. -</pre></div></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Pair. -</pre></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.State. -</pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. - -Examples: - (from-maybe (just 1)) - ;=> 1 - (from-maybe (nothing)) - ;=> nil -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function -to State class instance. -State class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -State type.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/index.html b/codox-dev/index.html index f6c7e28..90d2507 100644 --- a/codox-dev/index.html +++ b/codox-dev/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-*forced-context*">*forced-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3EEither">->Either</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-trans">either-trans</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-trans">maybe-trans</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-pair">pair</a> </li><li> <a href="cats.monad.state.html#var-pair.3F">pair?</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3EEither">->Either</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index-dev.html b/index-dev.html index 61f8ab2..a8a5634 100644 --- a/index-dev.html +++ b/index-dev.html @@ -1,626 +1,1466 @@ <!DOCTYPE html> <html lang="en"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="generator" content="AsciiDoc 8.6.9"> +<meta charset="UTF-8"> +<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<meta name="generator" content="Asciidoctor 1.5.1"> +<meta name="author" content="Andrey Antukh & Alejandro Gómez"> <title>Category Theory abstractions for Clojure</title> -<link rel="stylesheet" href="static/niwi.css" type="text/css"> -<link rel="stylesheet" href="static/pygments.css" type="text/css"> - - -<script type="text/javascript" src="static/asciidoc.js"></script> -<script type="text/javascript" src="static/niwi.js"></script> -<script type="text/javascript"> -/*<![CDATA[*/ -asciidoc.install(2); -/*]]>*/ -</script> +<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"> +<style> +/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ +/* Remove the comments around the @import statement below when using this as a custom stylesheet */ +/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400";*/ +article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} +audio,canvas,video{display:inline-block} +audio:not([controls]){display:none;height:0} +[hidden],template{display:none} +script{display:none!important} +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} +body{margin:0} +a{background:transparent} +a:focus{outline:thin dotted} +a:active,a:hover{outline:0} +h1{font-size:2em;margin:.67em 0} +abbr[title]{border-bottom:1px dotted} +b,strong{font-weight:bold} +dfn{font-style:italic} +hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} +mark{background:#ff0;color:#000} +code,kbd,pre,samp{font-family:monospace;font-size:1em} +pre{white-space:pre-wrap} +q{quotes:"\201C" "\201D" "\2018" "\2019"} +small{font-size:80%} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sup{top:-.5em} +sub{bottom:-.25em} +img{border:0} +svg:not(:root){overflow:hidden} +figure{margin:0} +fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} +legend{border:0;padding:0} +button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} +button,input{line-height:normal} +button,select{text-transform:none} +button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} +button[disabled],html input[disabled]{cursor:default} +input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} +input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} +input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} +textarea{overflow:auto;vertical-align:top} +table{border-collapse:collapse;border-spacing:0} +*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} +html,body{font-size:100%} +body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} +a:hover{cursor:pointer} +img,object,embed{max-width:100%;height:auto} +object,embed{height:100%} +img{-ms-interpolation-mode:bicubic} +#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} +.left{float:left!important} +.right{float:right!important} +.text-left{text-align:left!important} +.text-right{text-align:right!important} +.text-center{text-align:center!important} +.text-justify{text-align:justify!important} +.hide{display:none} +.antialiased,body{-webkit-font-smoothing:antialiased} +img{display:inline-block;vertical-align:middle} +textarea{height:auto;min-height:50px} +select{width:100%} +p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} +.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} +div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} +a{color:#2156a5;text-decoration:underline;line-height:inherit} +a:hover,a:focus{color:#1d4b8f} +a img{border:none} +p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} +p aside{font-size:.875em;line-height:1.35;font-style:italic} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} +h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} +h1{font-size:2.125em} +h2{font-size:1.6875em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} +h4,h5{font-size:1.125em} +h6{font-size:1em} +hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} +em,i{font-style:italic;line-height:inherit} +strong,b{font-weight:bold;line-height:inherit} +small{font-size:60%;line-height:inherit} +code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} +ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} +ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} +ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} +ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} +ul.square{list-style-type:square} +ul.circle{list-style-type:circle} +ul.disc{list-style-type:disc} +ul.no-bullet{list-style:none} +ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} +dl dt{margin-bottom:.3125em;font-weight:bold} +dl dd{margin-bottom:1.25em} +abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} +abbr{text-transform:none} +blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} +blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} +blockquote cite:before{content:"\2014 \0020"} +blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} +blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} +@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} +h1{font-size:2.75em} +h2{font-size:2.3125em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} +h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} +table thead,table tfoot{background:#f7f8f7;font-weight:bold} +table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} +table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} +table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} +table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} +h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} +.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} +.clearfix:after,.float-group:after{clear:both} +*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} +pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} +.keyseq{color:rgba(51,51,51,.8)} +kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} +.keyseq kbd:first-child{margin-left:0} +.keyseq kbd:last-child{margin-right:0} +.menuseq,.menu{color:rgba(0,0,0,.8)} +b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} +b.button:before{content:"[";padding:0 3px 0 2px} +b.button:after{content:"]";padding:0 2px 0 3px} +p a>code:hover{color:rgba(0,0,0,.9)} +#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} +#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} +#header:after,#content:after,#footnotes:after,#footer:after{clear:both} +#content{margin-top:1.25em} +#content:before{content:none} +#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} +#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} +#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} +#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} +#header .details span:first-child{margin-left:-.125em} +#header .details span.email a{color:rgba(0,0,0,.85)} +#header .details br{display:none} +#header .details br+span:before{content:"\00a0\2013\00a0"} +#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} +#header .details br+span#revremark:before{content:"\00a0|\00a0"} +#header #revnumber{text-transform:capitalize} +#header #revnumber:after{content:"\00a0"} +#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} +#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} +#toc>ul{margin-left:.125em} +#toc ul.sectlevel0>li>a{font-style:italic} +#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} +#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} +#toc a{text-decoration:none} +#toc a:active{text-decoration:underline} +#toctitle{color:#7a2518;font-size:1.2em} +@media only screen and (min-width:768px){#toctitle{font-size:1.375em} +body.toc2{padding-left:15em;padding-right:0} +#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} +#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} +#toc.toc2>ul{font-size:.9em;margin-bottom:0} +#toc.toc2 ul ul{margin-left:0;padding-left:1em} +#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} +body.toc2.toc-right{padding-left:0;padding-right:15em} +body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} +#toc.toc2{width:20em} +#toc.toc2 #toctitle{font-size:1.375em} +#toc.toc2>ul{font-size:.95em} +#toc.toc2 ul ul{padding-left:1.25em} +body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +#content #toc>:first-child{margin-top:0} +#content #toc>:last-child{margin-bottom:0} +#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} +#footer-text{color:rgba(255,255,255,.8);line-height:1.44} +.sect1{padding-bottom:.625em} +@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} +#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} +#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} +#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} +#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} +#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} +.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} +.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} +table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} +.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} +table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} +.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} +.admonitionblock>table td.icon{text-align:center;width:80px} +.admonitionblock>table td.icon img{max-width:none} +.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} +.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} +.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} +.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} +.exampleblock>.content>:first-child{margin-top:0} +.exampleblock>.content>:last-child{margin-bottom:0} +.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +.sidebarblock>:first-child{margin-top:0} +.sidebarblock>:last-child{margin-bottom:0} +.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} +.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} +.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} +.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} +.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} +.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} +@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} +.listingblock pre.highlightjs{padding:0} +.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} +.listingblock pre.prettyprint{border-width:0} +.listingblock>.content{position:relative} +.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} +.listingblock:hover code[data-lang]:before{display:block} +.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} +.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} +table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} +table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} +table.pyhltable td.code{padding-left:.75em;padding-right:0} +pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} +pre.pygments .lineno{display:inline-block;margin-right:.25em} +table.pyhltable .linenodiv{background:none!important;padding-right:0!important} +.quoteblock{margin:0 1em 1.25em 1.5em;display:table} +.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} +.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} +.quoteblock blockquote{margin:0;padding:0;border:0} +.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} +.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} +.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} +.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} +.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} +.quoteblock .quoteblock blockquote:before{display:none} +.verseblock{margin:0 1em 1.25em 1em} +.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} +.verseblock pre strong{font-weight:400} +.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} +.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} +.quoteblock .attribution br,.verseblock .attribution br{display:none} +.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} +.quoteblock.abstract{margin:0 0 1.25em 0;display:block} +.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} +.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} +table.tableblock{max-width:100%;border-collapse:separate} +table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} +table.spread{width:100%} +table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} +table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} +table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} +table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} +table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} +table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} +table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} +table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} +table.frame-all{border-width:1px} +table.frame-sides{border-width:0 1px} +table.frame-topbot{border-width:1px 0} +th.halign-left,td.halign-left{text-align:left} +th.halign-right,td.halign-right{text-align:right} +th.halign-center,td.halign-center{text-align:center} +th.valign-top,td.valign-top{vertical-align:top} +th.valign-bottom,td.valign-bottom{vertical-align:bottom} +th.valign-middle,td.valign-middle{vertical-align:middle} +table thead th,table tfoot th{font-weight:bold} +tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} +tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} +p.tableblock>code:only-child{background:none;padding:0} +p.tableblock{font-size:1em} +td>div.verse{white-space:pre} +ol{margin-left:1.75em} +ul li ol{margin-left:1.5em} +dl dd{margin-left:1.125em} +dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} +ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} +ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} +ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} +ul.checklist li>p:first-child>.fa-check-square-o:first-child,ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em} +ul.checklist li>p:first-child>input[type="checkbox"]:first-child{position:relative;top:1px} +ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} +ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} +ul.inline>li>*{display:block} +.unstyled dl dt{font-weight:400;font-style:normal} +ol.arabic{list-style-type:decimal} +ol.decimal{list-style-type:decimal-leading-zero} +ol.loweralpha{list-style-type:lower-alpha} +ol.upperalpha{list-style-type:upper-alpha} +ol.lowerroman{list-style-type:lower-roman} +ol.upperroman{list-style-type:upper-roman} +ol.lowergreek{list-style-type:lower-greek} +.hdlist>table,.colist>table{border:0;background:none} +.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} +td.hdlist1{padding-right:.75em;font-weight:bold} +td.hdlist1,td.hdlist2{vertical-align:top} +.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} +.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} +.colist>table tr>td:last-of-type{padding:.25em 0} +.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} +.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} +.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} +.imageblock>.title{margin-bottom:0} +.imageblock.thumb,.imageblock.th{border-width:6px} +.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} +.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} +.image.left{margin-right:.625em} +.image.right{margin-left:.625em} +a.image{text-decoration:none} +span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} +span.footnote a,span.footnoteref a{text-decoration:none} +span.footnote a:active,span.footnoteref a:active{text-decoration:underline} +#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} +#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} +#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} +#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} +#footnotes .footnote:last-of-type{margin-bottom:0} +#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} +.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} +.gist .file-data>table td.line-data{width:99%} +div.unbreakable{page-break-inside:avoid} +.big{font-size:larger} +.small{font-size:smaller} +.underline{text-decoration:underline} +.overline{text-decoration:overline} +.line-through{text-decoration:line-through} +.aqua{color:#00bfbf} +.aqua-background{background-color:#00fafa} +.black{color:#000} +.black-background{background-color:#000} +.blue{color:#0000bf} +.blue-background{background-color:#0000fa} +.fuchsia{color:#bf00bf} +.fuchsia-background{background-color:#fa00fa} +.gray{color:#606060} +.gray-background{background-color:#7d7d7d} +.green{color:#006000} +.green-background{background-color:#007d00} +.lime{color:#00bf00} +.lime-background{background-color:#00fa00} +.maroon{color:#600000} +.maroon-background{background-color:#7d0000} +.navy{color:#000060} +.navy-background{background-color:#00007d} +.olive{color:#606000} +.olive-background{background-color:#7d7d00} +.purple{color:#600060} +.purple-background{background-color:#7d007d} +.red{color:#bf0000} +.red-background{background-color:#fa0000} +.silver{color:#909090} +.silver-background{background-color:#bcbcbc} +.teal{color:#006060} +.teal-background{background-color:#007d7d} +.white{color:#bfbfbf} +.white-background{background-color:#fafafa} +.yellow{color:#bfbf00} +.yellow-background{background-color:#fafa00} +span.icon>.fa{cursor:default} +.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} +.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} +.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} +.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} +.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} +.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} +.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} +.conum[data-value] *{color:#fff!important} +.conum[data-value]+b{display:none} +.conum[data-value]:after{content:attr(data-value)} +pre .conum[data-value]{position:relative;top:-.125em} +b.conum *{color:inherit!important} +.conum:not([data-value]):empty{display:none} +h1,h2{letter-spacing:-.01em} +dt,th.tableblock,td.content{text-rendering:optimizeLegibility} +p,td.content{letter-spacing:-.01em} +p strong,td.content strong{letter-spacing:-.005em} +p,blockquote,dt,td.content{font-size:1.0625rem} +p{margin-bottom:1.25rem} +.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} +.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} +.print-only{display:none!important} +@media print{@page{margin:1.25cm .75cm} +*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} +a{color:inherit!important;text-decoration:underline!important} +a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} +a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} +abbr[title]:after{content:" (" attr(title) ")"} +pre,blockquote,tr,img{page-break-inside:avoid} +thead{display:table-header-group} +img{max-width:100%!important} +p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} +h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} +#toc,.sidebarblock,.exampleblock>.content{background:none!important} +#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} +.sect1{padding-bottom:0!important} +.sect1+.sect1{border:0!important} +#header>h1:first-child{margin-top:1.25rem} +body.book #header{text-align:center} +body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} +body.book #header .details{border:0!important;display:block;padding:0!important} +body.book #header .details span:first-child{margin-left:0!important} +body.book #header .details br{display:block} +body.book #header .details br+span:before{content:none!important} +body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} +body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} +.listingblock code[data-lang]:before{display:block} +#footer{background:none!important;padding:0 .9375em} +#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} +.hide-on-print{display:none!important} +.print-only{display:block!important} +.hide-for-print{display:none!important} +.show-for-print{display:inherit!important}} +</style> +<style> +.listingblock .pygments .hll { background-color: #ffffcc } +.listingblock .pygments { background: #f0f0f0; } +.listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ +.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ +.listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ +.listingblock .pygments .tok-o { color: #666666 } /* Operator */ +.listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ +.listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ +.listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ +.listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ +.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ +.listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ +.listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ +.listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ +.listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ +.listingblock .pygments .tok-gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ +.listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ +.listingblock .pygments .tok-kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.listingblock .pygments .tok-kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.listingblock .pygments .tok-kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.listingblock .pygments .tok-kp { color: #007020 } /* Keyword.Pseudo */ +.listingblock .pygments .tok-kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.listingblock .pygments .tok-kt { color: #902000 } /* Keyword.Type */ +.listingblock .pygments .tok-m { color: #40a070 } /* Literal.Number */ +.listingblock .pygments .tok-s { color: #4070a0 } /* Literal.String */ +.listingblock .pygments .tok-na { color: #4070a0 } /* Name.Attribute */ +.listingblock .pygments .tok-nb { color: #007020 } /* Name.Builtin */ +.listingblock .pygments .tok-nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.listingblock .pygments .tok-no { color: #60add5 } /* Name.Constant */ +.listingblock .pygments .tok-nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.listingblock .pygments .tok-ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.listingblock .pygments .tok-ne { color: #007020 } /* Name.Exception */ +.listingblock .pygments .tok-nf { color: #06287e } /* Name.Function */ +.listingblock .pygments .tok-nl { color: #002070; font-weight: bold } /* Name.Label */ +.listingblock .pygments .tok-nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.listingblock .pygments .tok-nt { color: #062873; font-weight: bold } /* Name.Tag */ +.listingblock .pygments .tok-nv { color: #bb60d5 } /* Name.Variable */ +.listingblock .pygments .tok-ow { color: #007020; font-weight: bold } /* Operator.Word */ +.listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ +.listingblock .pygments .tok-mb { color: #40a070 } /* Literal.Number.Bin */ +.listingblock .pygments .tok-mf { color: #40a070 } /* Literal.Number.Float */ +.listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ +.listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ +.listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ +.listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ +.listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ +.listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ +.listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.listingblock .pygments .tok-sh { color: #4070a0 } /* Literal.String.Heredoc */ +.listingblock .pygments .tok-si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.listingblock .pygments .tok-sx { color: #c65d09 } /* Literal.String.Other */ +.listingblock .pygments .tok-sr { color: #235388 } /* Literal.String.Regex */ +.listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ +.listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ +.listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ +.listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ +.listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ +.listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ +.listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ +</style> </head> -<body class="article" style="max-width:960px"> +<body class="article toc2 toc-left"> <div id="header"> <h1>Category Theory abstractions for Clojure</h1> -<span id="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revnumber">version 0.2.0,</span> -<span id="revdate">2014-07-15</span> -<div id="toc"> - <div id="toctitle">Table of Contents</div> - <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript> +<div class="details"> +<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> +<span id="revdate">0.2.0</span> +</div> +<div id="toc" class="toc2"> +<div id="toctitle">Table of Contents</div> +<ul class="sectlevel1"> +<li><a href="#_introduction">1. Introduction</a> +<ul class="sectlevel2"> +<li><a href="#_why_another_library">1.1. Why another library?</a></li> +</ul> +</li> +<li><a href="#_project_maturity">2. Project Maturity</a></li> +<li><a href="#_install">3. Install</a> +<ul class="sectlevel2"> +<li><a href="#_leiningen">3.1. Leiningen</a></li> +<li><a href="#_maven">3.2. Maven</a></li> +<li><a href="#_get_the_code">3.3. Get the Code</a></li> +</ul> +</li> +<li><a href="#_user_guide">4. User Guide</a> +<ul class="sectlevel2"> +<li><a href="#_functor">4.1. Functor</a></li> +<li><a href="#_applicative">4.2. Applicative</a></li> +<li><a href="#_monad">4.3. Monad</a></li> +</ul> +</li> +<li><a href="#_clojure_types">5. Clojure Types</a></li> +<li><a href="#_faq">6. FAQ</a> +<ul class="sectlevel2"> +<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> +</ul> +</li> +<li><a href="#_how_to_contribute">7. How to Contribute?</a> +<ul class="sectlevel2"> +<li><a href="#_philosophy">7.1. Philosophy</a></li> +<li><a href="#_procedure">7.2. Procedure</a></li> +<li><a href="#_license">7.3. License</a></li> +</ul> +</li> +</ul> </div> </div> <div id="content"> <div id="preamble"> <div class="sectionbody"> -<div class="paragraph"><p><span class="image"> -<img src="static/logo/logo.png" alt="cats logo"> -</span></p></div> +<div class="paragraph"> +<p><span class="image"><img src="logo.png" alt="cats logo"></span></p> +</div> </div> </div> <div class="sect1"> -<h2 id="_introduction">Introduction</h2> +<h2 id="_introduction">1. Introduction</h2> <div class="sectionbody"> -<div class="paragraph"><p>Category Theory abstractions for Clojure.</p></div> -<div class="sect2"> -<h3 id="_philosophy">Philosophy</h3> -<div class="paragraph"><p>Four most important rules:</p></div> -<div class="ulist"><ul> -<li> -<p> -Beautiful is better than ugly -</p> -</li> -<li> -<p> -Explicit is better than implicit -</p> -</li> -<li> -<p> -Simple is better than complex -</p> -</li> -<li> -<p> -Readability counts -</p> -</li> -</ul></div> +<div class="paragraph"> +<p>Category Theory abstractions for Clojure.</p> </div> <div class="sect2"> -<h3 id="_why_another_library">Why another library?</h3> -<div class="paragraph"><p>Because cats library:</p></div> -<div class="ulist"><ul> -<li> -<p> -targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong> -</p> -</li> -<li> -<p> -aims to have the most simple implementation for supported abstractions. -</p> -</li> -<li> -<p> -aims to have more abstractions that are simple monads. -</p> -</li> +<h3 id="_why_another_library">1.1. Why another library?</h3> +<div class="paragraph"> +<p>Because cats library:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -has documentation as first class citizen. -</p> +<p>targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> </li> <li> -<p> -licensed under a permissive license (compared to other libraries): BSD (2-Clause) -</p> +<p>aims to have the most simple implementation for supported abstractions.</p> </li> -</ul></div> -<div class="paragraph"><p>This is an incomplete list of differences with other existing libraries:</p></div> -<div class="ulist"><ul> <li> -<p> -The official monads library <span class="monospaced">algo.monads</span> is very good, but its approach for modeling - is slighty limited (e.g. you always need to specify what monad you want use instead of - relying on the type). And obviously because it only has monads. -</p> +<p>aims to have more abstractions that are simple monads.</p> </li> <li> -<p> -Fluokitten is the best library that we found, but the future of it is uncertain. One big - difference with fluokitten is that <span class="monospaced">cats</span> doesn’t aim to extend every clojure type - with monadic protocols, for the obvious reason that monad; functor and applicative represents - context/wrapper types and it doesn’t make sense to implement Functor protocol for <span class="monospaced">java.lang.String</span>. -</p> +<p>has documentation as first class citizen.</p> </li> <li> -<p> -<span class="monospaced">bwo/monads</span> is the last monads library. It is completely undocumented and its implementation - has much unnecesary complexity. -</p> +<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> </li> -</ul></div> +</ul> </div> -<div class="sect2"> -<h3 id="_project_maturity">Project Maturity</h3> -<div class="paragraph"><p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> -breakage.</p></div> </div> </div> </div> <div class="sect1"> -<h2 id="_install">Install</h2> +<h2 id="_project_maturity">2. Project Maturity</h2> <div class="sectionbody"> -<div class="paragraph"><p>This section covers installing <em>cats</em>.</p></div> -<div class="sect2"> -<h3 id="_requirements">Requirements</h3> -<div class="paragraph"><p><em>cats</em> supports:</p></div> -<div class="ulist"><ul> -<li> -<p> -JDK7 -</p> -</li> -<li> -<p> -JDK8 -</p> -</li> -</ul></div> +<div class="paragraph"> +<p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> breakage.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_install">3. Install</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section covers installing <em>cats</em>.</p> </div> <div class="sect2"> -<h3 id="_leiningen">Leiningen</h3> -<div class="paragraph"><p>The simplest way to use <em>cats</em> in a Clojure project is by including -it as a dependency in your <strong><em>project.clj</em></strong>:</p></div> +<h3 id="_leiningen">3.1. Leiningen</h3> +<div class="paragraph"> +<p>The simplest way to use <em>cats</em> in a Clojure project is by including +it as a dependency in your <strong><em>project.clj</em></strong>:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">[</span><span class="nv">cats</span> <span class="s">"0.2.0-SNAPSHOT"</span><span class="p">]</span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.2.0-SNAPSHOT"</span><span class="tok-p">]</span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_maven">Maven</h3> -<div class="paragraph"><p>Also, you can use it with maven. First, add the clojars repository:</p></div> +<h3 id="_maven">3.2. Maven</h3> +<div class="paragraph"> +<p>Also, you can use it with maven. First, add the clojars repository:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="nt"><repository></span> - <span class="nt"><id></span>clojars.org<span class="nt"></id></span> - <span class="nt"><url></span>http://clojars.org/repo<span class="nt"></url></span> -<span class="nt"></repository></span> -</pre></div></div></div> -<div class="paragraph"><p>Then for cats:</p></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> + <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> + <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> +<span class="tok-nt"></repository></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Then for cats:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="nt"><dependency></span> - <span class="nt"><groupId></span>cats<span class="nt"></groupId></span> - <span class="nt"><artifactId></span>cats<span class="nt"></artifactId></span> - <span class="nt"><version></span>0.2.0-SNAPSHOT<span class="nt"></version></span> -<span class="nt"></dependency></span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> + <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> + <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> + <span class="tok-nt"><version></span>0.2.0-SNAPSHOT<span class="tok-nt"></version></span> +<span class="tok-nt"></dependency></span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_get_the_code">Get the Code</h3> -<div class="paragraph"><p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p></div> -<div class="paragraph"><p>You can clone the public repository with this command:</p></div> +<h3 id="_get_the_code">3.3. Get the Code</h3> +<div class="paragraph"> +<p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p> +</div> +<div class="paragraph"> +<p>You can clone the public repository with this command:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre>git clone https://github.com/niwibe/cats -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/niwibe/cats</code></pre> +</div> +</div> </div> </div> </div> <div class="sect1"> -<h2 id="_abstractions">Abstractions</h2> +<h2 id="_user_guide">4. User Guide</h2> <div class="sectionbody"> -<div class="paragraph"><p>This section introduces almost all category theory abstractios that cats library -supports.</p></div> -<div class="paragraph"><p>And for it, we are using <em>Maybe</em> type for all examples beacuse that type implements -all protocols. You can read more about it in the next section.</p></div> +<div class="paragraph"> +<p>This section introduces almost all category theory abstractios that cats library +supports.</p> +</div> +<div class="paragraph"> +<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all +abstractions and it very easy to understand. You can read more about it in the next +section of this documentation.</p> +</div> <div class="sect2"> -<h3 id="_functor">Functor</h3> -<div class="paragraph"><p>The Functor represents some sort of "computational context".</p></div> +<h3 id="_functor">4.1. Functor</h3> +<div class="paragraph"> +<p>Let start with functor. The Functor represents some sort of "computational context", and the +abstraction consists in one unique function: <strong>fmap</strong>.</p> +</div> <div class="listingblock"> -<div class="title">Functor protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Functor</span> - <span class="p">(</span><span class="nf">fmap</span> <span class="p">[</span><span class="nv">fv</span> <span class="nv">f</span><span class="p">]</span> - <span class="s">"Applies function f to the value(s) inside</span> -<span class="s"> the context of the functor fv."</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p><span class="monospaced">fmap</span> takes one wrapped value in functor context fv (ex: <span class="monospaced">Just 2</span>) and a plain function, -unwraps the value and applies a function to the plain value returning it wrapped in a new context -of <strong>the same type</strong> as the first argument.</p></div> -<div class="paragraph"><p>Some examples can explain it better:</p></div> +<div class="title">Signature of <strong>fmap</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The high order function <strong>fmap</strong> takes a plain function as first parameter and +value wrapped in functor context as second parameter. It extracts the inner value +apply the function to it, and return the result wrapped in same type as the second +parameter.</p> +</div> +<div class="paragraph"> +<p>But, what is the <strong>*functor context</strong>? It sonds more complex that it is. Functor +wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocol.</p> +</div> +<div class="paragraph"> +<p>One good example of functor context is the <strong>Maybe</strong> type:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> -<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.maybe</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> -<span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> -<span class="c1">;; => #<Just [2]></span> -</pre></div></div></div> -<div class="paragraph"><p>Same example but applying function over <strong>Nothing</strong>:</p></div> +<span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p><strong>just</strong> is one of two constructors of <strong>Maybe</strong> type and it’s only wraps the real +value. Now, let see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>But <strong>Maybe</strong> has another constructor: <code>maybe/nothing</code>. This constructor makes +empty object that not wraps anything. Is the safe substitute of <code>nil</code> and +represents the failure.</p> +</div> +<div class="paragraph"> +<p>Let see that is happens if we make same operation of previous example over +<strong>nothing</strong> instance:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Oh, awesome, instead of raising null pointer exception, it just return <strong>nothing</strong>.</p> +</div> +<div class="paragraph"> +<p>An other good advantage of use functor abstraction, is that it always return result +in the same type of second argument</p> +</div> +<div class="paragraph"> +<p>Let see one example of apply fmap over clojure vector:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 3 4]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The main difference compared to the previous example with default clojure map, is that the clojure +map works with seqs and doesn’t respect the input container:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => (2 3 4)</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>But why fmap works with vectors? Because some "container" types of clojure like vectors, +lists or sets also implements the functor abstraction.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_applicative">4.2. Applicative</h3> +<div class="paragraph"> +<p>Let continue with applicative function. The Applicative Functor represents +some sort of "computational context" like plain Functor, but with abilty of +execute a function wrapped in same context.</p> +</div> +<div class="paragraph"> +<p>Applicative Functor abstraction consists in two functions: <strong>fapply</strong> and +<strong>pure</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Signature of <strong>fapply</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> <td class="content"> -<div class="paragraph"><p>The real fmap signature is <span class="monospaced">(a -> b) -> f a -> f b</span> that can be translated to clojure <span class="monospaced">[f fv]</span>.</p></div> -<div class="paragraph"><p>The changed order of the protocol parameters definition is required because of clojure’s protocols -limitation that only allow dispatching on the first argument.</p></div> -<div class="paragraph"><p>You should never use a protocol function directly. Instead use <span class="monospaced">cats.core/fmap</span>. It has -the correct signature.</p></div> -<div class="paragraph"><p>All examples in this documentation uses <span class="monospaced">cats.core/fmap</span> instead of a function defined in the -protocol.</p></div> +<strong>pure</strong> function it will be explained later. </td> -</tr></table> +</tr> +</table> +</div> +<div class="paragraph"> +<p>The use case of Applicative Functors is much same as of plain Functors: safe +evaluation of some computation in a context.</p> +</div> +<div class="paragraph"> +<p>Let see one exaple for understand better the differences between functor and +applicative functor:</p> +</div> +<div class="paragraph"> +<p>Imagine, you have some factory function that depending of language, return a +greater function and you only has support for few languages.</p> </div> -<div class="paragraph"><p>Some of the native clojure types, like Vector, also implements the Functor protocol and can -work like a functor context/container:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;; => [2 3 4]</span> -</pre></div></div></div> -<div class="paragraph"><p>The main difference compared to the previous example with default clojure map, is that the clojure -map works with seqs and doesn’t respect the input container:</p></div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nb">map inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;; => (2 3 4)</span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-nv">nil</span><span class="tok-p">))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, if you want to use it, you should always defensively check if returned +greater is a valid function or is a nil value.</p> +</div> +<div class="paragraph"> +<p>Lets go to convert this factory to use Maybe type:</p> </div> -<div class="sect2"> -<h3 id="_applicative_functor">Applicative Functor</h3> -<div class="paragraph"><p>Represents an abstraction lying in between Functor and Monad in expressivity.</p></div> <div class="listingblock"> -<div class="title">Applicative protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Applicative</span> - <span class="p">(</span><span class="nf">fapply</span> <span class="p">[</span><span class="nv">af</span> <span class="nv">av</span><span class="p">]</span> - <span class="s">"Applies the function(s) inside ag's context to the value(s)</span> -<span class="s"> inside av's context while preserving the context."</span><span class="p">)</span> - <span class="p">(</span><span class="nf">pure</span> <span class="p">[</span><span class="nv">ctx</span> <span class="nv">v</span><span class="p">]</span> - <span class="s">"Takes any context monadic value ctx and any value v, and puts</span> -<span class="s"> the value v in the most minimal context of the same type of ctx"</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p>With the same idea of data inside a context (like <span class="monospaced">Functor</span>), what happens if a wrapped value is -one function/computation? Applicative functors works like plain functors but additionally -can apply a function wrapped in some context similar to input value.</p></div> -<div class="paragraph"><p>Let see one example:</p></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can observe, this version of factory differs little bit from the +original implementation. And this little change makes you superpower: you +can apply the returned greater to any value without defensive nil checking:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defn </span><span class="nv">make-greeter</span> - <span class="p">[</span><span class="o">^</span><span class="nv">String</span> <span class="nv">lang</span><span class="p">]</span> - <span class="p">(</span><span class="nf">condp</span> <span class="nb">= </span><span class="nv">lang</span> - <span class="s">"es"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hola "</span> <span class="nv">name</span><span class="p">)))</span> - <span class="s">"en"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hello "</span> <span class="nv">name</span><span class="p">)))</span> - <span class="p">(</span><span class="nf">nothing</span><span class="p">)))</span> - -<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"es"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> -<span class="c1">;; => #<Just [Hola Alex]></span> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hola Alex]></span> -<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"en"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> -<span class="c1">;; => #<Just [Hello Alex]></span> +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hello Alex]></span> -<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"it"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> -<div class="paragraph"><p>Moreover, the applicative functor protocol comes with another function: <span class="monospaced">pure</span>. The main purpose of -this function is, given any value in a context and new value, wrap the new value in a minimal context of the same -type as the first argument.</p></div> -<div class="paragraph"><p>Examples:</p></div> +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Moreover the applicative functor comes with <strong>pure</strong> function, and main purpose of this function is +put some value in side effect free contex of the current type.</p> +</div> +<div class="paragraph"> +<p>Examples:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="mi">5</span><span class="p">)</span> -<span class="c1">;; => #<Just [5]></span> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [5]></span> -<span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nb">right </span><span class="ss">:foo</span><span class="p">)</span> <span class="ss">:bar</span><span class="p">)</span> -<span class="c1">;; => #<Either [:bar :right]></span> -</pre></div></div></div> -<div class="paragraph"><p>You will understand the real purpose of this function when using a <strong>Monad</strong> abstraction.</p></div> +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>If you not understand the purpose of <strong>pure</strong> function, it is possible that the next section +can clarify the real purpose of it.</p> +</div> </div> <div class="sect2"> -<h3 id="_monad">Monad</h3> -<div class="paragraph"><p>Monads are the most discussed programming concept to come from category theory. Like functors and -applicatives, monads deal with data in contexts.</p></div> -<div class="paragraph"><p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and -put new values in a completely different context.</p></div> -<div class="listingblock"> -<div class="title">Monad protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Monad</span> - <span class="s">"Incomplete monad type definition."</span> - <span class="p">(</span><span class="nf">bind</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">f</span><span class="p">]</span> <span class="s">"Applies the function f to the value(s) inside mv's context."</span><span class="p">))</span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content">As opposed to haskell type classes, <em>cats</em> protocols only define one method: <span class="monospaced">bind</span>. Other -related methods like <span class="monospaced">return</span> are defined as auxiliar functions in <span class="monospaced">cats.core</span>.</td> -</tr></table> -</div> -<div class="paragraph"><p><span class="monospaced">bind</span> function, takes a monadic value (any container that implements a <span class="monospaced">Monad</span> protocol) and one -function, applies the function with unwrapped value as first parameter and returns a result. In this -case, the function is responsible for wrapping the result in a corresponding context.</p></div> -<div class="paragraph"><p>One of the key features of the bind function is that everything inside a monad context knows the context -type. Having this, if you apply some computation over a monad and you want to return the result -in the same container context but you don’t know that container is it, you can use <span class="monospaced">return</span> or <span class="monospaced">pure</span>.</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">bind</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">v</span><span class="p">]</span> <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">inc </span><span class="nv">v</span><span class="p">))))</span> -<span class="c1">;; => #<Just [2]></span> -</pre></div></div></div> -<div class="paragraph"><p>The <span class="monospaced">return</span> or <span class="monospaced">pure</span> functions, when called with one argument, try to use the dynamic scope context value -that’s set internally by the <span class="monospaced">bind</span> function. Therefore you can’t use them with one argument out of a <span class="monospaced">bind</span> context.</p></div> -<div class="paragraph"><p>And finally, to make more powerful monadic compositions, <em>cats</em> comes with the <span class="monospaced">mlet</span> macro that -if you are coming from haskell, represents a <span class="monospaced">do-syntax</span>:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> - <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> - <span class="nv">z</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">))]</span> - <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> -<span class="c1">;; => #<Just [3]></span> -</pre></div></div></div> -<div class="paragraph"><p>If you want to use regular (non-monadic) let bindings inside a <span class="monospaced">mlet</span> block, you can do so using -<span class="monospaced">:let</span> and a bindings vector as a pair inside the mlet bindings:</p></div> +<h3 id="_monad">4.3. Monad</h3> +<div class="paragraph"> +<p>Monads are the most discussed programming concept to come from category theory. Like functors and +applicatives, monads deal with data in contexts.</p> +</div> +<div class="paragraph"> +<p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and +put new values in a completely different context.</p> +</div> +<div class="paragraph"> +<p>The monad abstraction consists on two functions: <strong>bind</strong> and <strong>return</strong></p> +</div> +<div class="paragraph"> +<p><strong>bind</strong> function has the following signature:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> - <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> - <span class="ss">:let</span> <span class="p">[</span><span class="nv">z</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">)]]</span> - <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> -<span class="c1">;; => #<Just [3]></span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Let see one example:</p> </div> -<div class="sect2"> -<h3 id="_monadzero">MonadZero</h3> -<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">MonadZero</a> protocol -represents a monad that has a notion of an identity element.</p></div> <div class="listingblock"> -<div class="title">MonadZero protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadZero</span> - <span class="s">"A `Monad` that supports the notion of an identity element."</span> - <span class="p">(</span><span class="nf">mzero</span> <span class="p">[</span><span class="nv">ctx</span><span class="p">]</span> <span class="s">"The identity element for `ctx`."</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p>The <span class="monospaced">bind</span> operation on the identity element satisfies Left Zero:</p></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can observe, it works much like Functor but with inverted arguments, the main deference is +that in monad, the function is a responsible of wrapping a retuned value in a context.</p> +</div> +<div class="paragraph"> +<p>One of the key features of the bind function is that any computation executed inside of context of +bind (monad) knows the context type implicitly. Having this, if you apply some computation over some +monadic value and you want to return the result in the same container context but you don’t know +that container is it, you can use <code>return</code> or <code>pure</code> functions:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> - -<span class="p">(</span><span class="nb">= </span><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> - <span class="p">(</span><span class="nf">>>=</span> <span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> <span class="nv">just</span><span class="p">))</span> -<span class="c1">;; => true</span> -</pre></div></div></div> -<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:when</span> clauses can be used in <span class="monospaced">mlet</span> -bindings:</p></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context +value that’s set internally by the <code>bind</code> function. Therefore you can’t use them with one argument out +of a <code>bind</code> context.</p> +</div> +<div class="paragraph"> +<p>At this time, everything is fine, we not can compose any number of computations using monad <strong>*bind</strong> +functions. But that is happens where the number of computations increases:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</span> - <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> - <span class="p">(</span><span class="nf">return</span> <span class="nv">i</span><span class="p">))</span> -<span class="c1">;; => [3 4 5]</span> - -<span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">(</span><span class="nf">t/just</span> <span class="mi">2</span><span class="p">)</span> - <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> - <span class="p">(</span><span class="nf">m/return</span> <span class="nv">i</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>This easy grows to very beatiful callback hell. For solve this, <em>cats</em> comes with powerful +macro: <strong>mlet</strong></p> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +If you are coming from haskell, it represents the <code>do-syntax</code> of haskell. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>Let see the same example but translated to more clear code using mlet macro:</p> </div> -<div class="sect2"> -<h3 id="_monadplus">MonadPlus</h3> -<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadPlus">MonadPlus</a> protocol -represents a MonadZero wich has a plus operation.</p></div> <div class="listingblock"> -<div class="title">MonadPlus protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadPlus</span> - <span class="s">"A `MonadZero` that supports the notion of addition."</span> - <span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">mv</span><span class="o">'</span><span class="p">]</span> <span class="s">"An associative addition operation."</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p><span class="monospaced">mplus</span> is an associative binary operation for which the value that <span class="monospaced">mzero</span> gives is the identity -element. The <span class="monospaced">mplus</span> version contained in the core namespace is variadic.</p></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>If you want to use regular (non-monadic) let bindings inside a <code>mlet</code> block, you can do so using +<code>:let</code> and a bindings vector as a pair inside the mlet bindings:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.maybe</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">just</span> <span class="nv">nothing</span><span class="p">]])</span> -<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">mplus</span><span class="p">]])</span> - -<span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">]</span> <span class="p">[</span><span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span><span class="p">]</span> <span class="p">[</span><span class="mi">7</span> <span class="mi">8</span><span class="p">])</span> -<span class="c1">;; => [1 2 3 4 5 6 7 8]</span> - -<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> - -<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">))</span> -<span class="c1">;; => #<Just [42]></span> - -<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">3</span><span class="p">))</span> -<span class="c1">;; => #<Just [42]></span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))</span> + <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> +<div class="sect3"> +<h4 id="_monad_types">4.3.1. Monad types</h4> +<div class="paragraph"> +<p>Monad as is, is an abstraction, and we have seen two types in examples that implements +the monad abstraction: Maybe and Either. But they are the smallest part of types +that implements the Monad abstraction. In this section we try explain different +monad types supported by <em>cats</em> library.</p> </div> -<div class="sect1"> -<h2 id="_data_types_reference">Data Types reference</h2> -<div class="sectionbody"> -<div class="paragraph"><p>We talked about values in a context, but that is a context? Context per se is any value that -wraps an other value inside.</p></div> -<div class="sect2"> -<h3 id="_maybe">Maybe</h3> -<div class="paragraph"><p>This is one of the two most used monad types (commonly named Optional in non-functional programming -languages).</p></div> -<div class="paragraph"><p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is +<div class="sect4"> +<h5 id="_maybe">Maybe</h5> +<div class="paragraph"> +<p>This is one of the two most used monad types (commonly named Optional in non-functional programming +languages).</p> +</div> +<div class="paragraph"> +<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is used as the return type of functions which may or may not return a meaningful value when they are applied. It consists of either an empty constructor (called None or Nothing), or a constructor -encapsulating the original data type A (written Just A or Some A).</p></div> -<div class="paragraph"><p><em>cats</em>, implements two constructors:</p></div> -<div class="ulist"><ul> +encapsulating the original data type A (written Just A or Some A).</p> +</div> +<div class="paragraph"> +<p><em>cats</em>, implements two constructors:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -<span class="monospaced">(just v)</span>: represents just a value in a context. -</p> +<p><code>(just v)</code>: represents just a value in a context.</p> </li> <li> -<p> -<span class="monospaced">(nothing)</span>: represents a failure or null. -</p> +<p><code>(nothing)</code>: represents a failure or null.</p> </li> -</ul></div> +</ul> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.maybe</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> -<span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> -<span class="c1">;; => #<Just [1]></span> -<span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [1]></span> +<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">Maybe types are: Functors, Applicative Functors and Monads</td> -</tr></table> +<td class="content"> +Maybe types are: Functors, Applicative Functors and Monads +</td> +</tr> +</table> </div> </div> -<div class="sect2"> -<h3 id="_either">Either</h3> -<div class="paragraph"><p>Either is another type that represents a result of computation, but in contrast with maybe -it can return some data with a failed computation result.</p></div> -<div class="paragraph"><p>In <em>cats</em> it has two constructors:</p></div> -<div class="ulist"><ul> +<div class="sect4"> +<h5 id="_either">Either</h5> +<div class="paragraph"> +<p>Either is another type that represents a result of computation, but in contrast with maybe +it can return some data with a failed computation result.</p> +</div> +<div class="paragraph"> +<p>In <em>cats</em> it has two constructors:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -<span class="monospaced">(left v)</span>: represents a failure. -</p> +<p><code>(left v)</code>: represents a failure.</p> </li> <li> -<p> -<span class="monospaced">(right v)</span>: represents a successful result. -</p> +<p><code>(right v)</code>: represents a successful result.</p> </li> -</ul></div> +</ul> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.monad.either</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> -<span class="p">(</span><span class="nb">right </span><span class="ss">:valid-value</span><span class="p">)</span> -<span class="c1">;; => #<Right [:valid-value :right]></span> +<span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Right [:valid-value :right]></span> -<span class="p">(</span><span class="nb">left </span><span class="s">"Error message"</span><span class="p">)</span> -<span class="c1">;; => #<Either [Error message :left]></span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> +<span class="tok-p">(</span><span class="tok-nb">left </span><span class="tok-s">"Error message"</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [Error message :left]></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">Either is also (like Maybe) Functor, Applicative Functor and Monad.</td> -</tr></table> +<td class="content"> +Either is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> +</div> +</div> +<div class="sect4"> +<h5 id="_state">State</h5> +<div class="paragraph"> +<p>State monad in one of the special use cases of monads most used in haskell. It has different +purposes including: lazy computation composition and maintaining state without explicit state.</p> +</div> +<div class="paragraph"> +<p>The de facto monadic type of the state monad is a plain function. Function represents a computation +as is (without executing it). Obviously, a function should have some special characteristics to work +in monad state composition.</p> +</div> +<div class="listingblock"> +<div class="title">Valid function for valid state monad</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> + <span class="tok-s">"Takes state as argument and return a vector</span> +<span class="tok-s"> with first argument with procesed value and</span> +<span class="tok-s"> second argument the transformed new state."</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> + <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> + <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Right, you just saw an example of the low level primitive of state monad but for basic usage +you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p> +</div> +<div class="paragraph"> +<p>Let’s look at one example before explaining the details:</p> +</div> +<div class="listingblock"> +<div class="title">Lazy composition of computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> + <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> +<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>At the moment of evaluating the previous expression, anything that we have defined +is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p> +</div> +<div class="paragraph"> +<p>State is a simple wrapper for clojure functions, nothing more.</p> +</div> +<div class="paragraph"> +<p>Now, it time to execute the composed computation, for this we can use one of the following +functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>run-state</code> function executes the composed computation and returns both the value and the +result state.</p> +</li> +<li> +<p><code>eval-state</code> function executes the composed computation and returns the resulting value +discarding the state.</p> +</li> +<li> +<p><code>exec-state</code> function executes the composed computation and return only the resulting +state, ignoring the resulting value.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> +<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> 1</span> +<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> (2 3)</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +the pair instance returned by <code>run-state</code> functions works like any other seq of clojure, with +the difference that pairs can only have two slots. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them +seems out of the scope of this document.</p> +</div> +<div class="paragraph"> +<p>However, if you have better examples to explain the state monad, documentation for another monad or +any other contribution is always welcome.</p> +</div> +</div> +<div class="sect4"> +<h5 id="_reader">Reader</h5> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect4"> +<h5 id="_writer">Writer</h5> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect4"> +<h5 id="_continuation">Continuation</h5> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect4"> +<h5 id="_lazy">Lazy</h5> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect4"> +<h5 id="_vector">Vector</h5> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_monad_transformers">4.3.2. Monad Transformers</h4> +<div class="sect4"> +<h5 id="_motivation">Motivation</h5> +<div class="paragraph"> +<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, +we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> + <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> + +<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> +<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> +<span class="tok-c1">; contain a value of any type.</span> +<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> +<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>However, monads don’t compose as nicely as functors do. We have to actually implement +the composition ourselves.</p> +</div> +<div class="paragraph"> +<p>In some circumstances we would like combine the effects of two monads in another one. We call the +resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A +monad transformer is itself a monad.</p> +</div> +</div> +<div class="sect4"> +<h5 id="_using_monad_transformers">Using monad transformers</h5> +<div class="paragraph"> +<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer +using State as the base monad, since we want the resulting type to be a stateful computation +that may fail: <code>s -> Maybe (a, s)</code>.</p> +</div> +<div class="paragraph"> +<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with +any other monad. The transformer creating functions take a Monad as their argument and their +return a reified MonadTrans:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful +function that, when run, yields a Maybe containing a pair (value, next state).</p> +</div> +<div class="paragraph"> +<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. +When working with monad transformers we have to be explicit about what monad are we using to implement +the binding policy since there is no way to distinguish values from a transformer type from those of +a regular monad.</p> +</div> +<div class="paragraph"> +<p>TODO: better explanation of the above</p> +</div> +<div class="paragraph"> +<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe. Let’s see it in action:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> + <span class="tok-s">"A function that takes an input string as an state and</span> +<span class="tok-s"> consumes one character yielding it as a the value. The</span> +<span class="tok-s"> new state is the input string with the character consumed.</span> + +<span class="tok-s"> It fails when there isn't a character to consume."</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Nothing ></span> + +<span class="tok-c1">; We could have written `any-two-chars` more succintly using `cats.core/mlet-with`,</span> +<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> + +<span class="tok-c1">; We also define a function for applying parser to a given input</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>TODO: Implement simple parser as an example of transformer usage</p> +</div> +</div> </div> </div> </div> </div> <div class="sect1"> -<h2 id="_clojure_types">Clojure Types</h2> +<h2 id="_clojure_types">5. Clojure Types</h2> <div class="sectionbody"> -<div class="paragraph"><p>Besides the own types, some clojure types has implementations for previously explained -category theory abstractions.</p></div> -<div class="admonitionblock"> -<table><tr> +<div class="paragraph"> +<p>Besides the own types, some clojure types has implementations for previously explained +category theory abstractions.</p> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types +<td class="content"> +In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types that don’t act like containers. For example, clojure keywords are values but can not be containers so -they should not extend any of the previously explained protocols.</td> -</tr></table> +they should not extend any of the previously explained protocols. +</td> +</tr> +</table> </div> -<table class="tableblock frame-all grid-all" -style=" -width:100%; -"> +<table class="tableblock frame-all grid-all spread"> <caption class="title">Table 1. Summary of clojure types and implemented protocols</caption> -<col style="width:50%;"> -<col style="width:50%;"> +<colgroup> +<col style="width: 50%;"> +<col style="width: 50%;"> +</colgroup> <thead> <tr> -<th class="tableblock halign-left valign-top" > Name </th> -<th class="tableblock halign-left valign-top" > Implemented protocols</th> +<th class="tableblock halign-left valign-top">Name</th> +<th class="tableblock halign-left valign-top">Implemented protocols</th> </tr> </thead> <tbody> <tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">hash-set</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">list</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">atom</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">No one (in future)</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> </tbody> </table> </div> </div> <div class="sect1"> -<h2 id="_special_use_cases_of_monads">Special use cases of monads</h2> +<h2 id="_faq">6. FAQ</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_state_monad">State monad</h3> -<div class="paragraph"><p>State monad in one of the special use cases of monads most used in haskell. It has different -purposes including: lazy computation composition and maintaining state without explicit state.</p></div> -<div class="paragraph"><p>The de facto monadic type of the state monad is a plain function. Function represents a computation -as is (without executing it). Obviously, a function should have some special characteristics to work -in monad state composition.</p></div> -<div class="listingblock"> -<div class="title">Valid function for valid state monad</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">state</span><span class="p">]</span> - <span class="s">"Takes state as argument and return a vector</span> -<span class="s"> with first argument with procesed value and</span> -<span class="s"> second argument the transformed new state."</span> - <span class="p">(</span><span class="k">let </span><span class="p">[</span><span class="nv">newvalue</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)</span> - <span class="nv">newstate</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">)]</span> - <span class="p">[</span><span class="nv">newvalue</span> <span class="nv">newstate</span><span class="p">]))</span> -</pre></div></div></div> -<div class="paragraph"><p>Right, you just saw an example of the low level primitive of state monad but for basic usage -you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p></div> -<div class="paragraph"><p>Let’s look at one example before explaining the details:</p></div> -<div class="listingblock"> -<div class="title">Lazy composition of computations</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/mlet</span> <span class="p">[</span><span class="nv">state</span> <span class="p">(</span><span class="nf">m/get-state</span><span class="p">)</span> - <span class="nv">_</span> <span class="p">(</span><span class="nf">m/put-state</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">))]</span> - <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)))</span> -<span class="c1">;;=> #<State cats.monad.state.State@2eebabb6></span> -</pre></div></div></div> -<div class="paragraph"><p>At the moment of evaluating the previous expression, anything that we have defined -is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p></div> -<div class="paragraph"><p>State is a simple wrapper for clojure functions, nothing more.</p></div> -<div class="paragraph"><p>Now, it time to execute the composed computation, for this we can use one of the following -functions exposed by <em>cats</em>: <span class="monospaced">run-state</span>, <span class="monospaced">eval-state</span> and <span class="monospaced">exec-state</span>.</p></div> -<div class="ulist"><ul> +<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> +<div class="paragraph"> +<p>This is an incomplete list of differences with other existing libraries:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -<span class="monospaced">run-state</span> function executes the composed computation and returns both the value and the - result state. -</p> +<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling +is slighty limited (e.g. you always need to specify what monad you want use instead of +relying on the type). And obviously because it only has monads.</p> </li> <li> -<p> -<span class="monospaced">eval-state</span> function executes the composed computation and returns the resulting value - discarding the state. -</p> +<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big +difference with fluokitten is that <code>cats</code> doesn’t aim to extend every clojure type +with monadic protocols, for the obvious reason that monad; functor and applicative represents +context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> </li> <li> -<p> -<span class="monospaced">exec-state</span> function executes the composed computation and return only the resulting - state, ignoring the resulting value. -</p> +<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation +has much unnecesary complexity.</p> </li> -</ul></div> -<div class="listingblock"> -<div class="title">This is what happens when we execute these three functions over previously generated <span class="monospaced">State</span> instance</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/run-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;;=> #<Pair [1 (2 3)]></span> -<span class="p">(</span><span class="nf">m/eval-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;;=> 1</span> -<span class="p">(</span><span class="nf">m/exec-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;;=> (2 3)</span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content">the pair instance returned by <span class="monospaced">run-state</span> functions works like any other seq of clojure, with -the difference that pairs can only have two slots.</td> -</tr></table> +</ul> </div> -<div class="paragraph"><p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them -seems out of the scope of this document.</p></div> -<div class="paragraph"><p>However, if you have better examples to explain the state monad, documentation for another monad or -any other contribution is always welcome.</p></div> </div> </div> </div> <div class="sect1"> -<h2 id="_license">License</h2> +<h2 id="_how_to_contribute">7. How to Contribute?</h2> <div class="sectionbody"> +<div class="sect2"> +<h3 id="_philosophy">7.1. Philosophy</h3> +<div class="paragraph"> +<p>Five most important rules:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Beautiful is better than ugly.</p> +</li> +<li> +<p>Explicit is better than implicit.</p> +</li> +<li> +<p>Simple is better than complex.</p> +</li> +<li> +<p>Complex is better than complicated.</p> +</li> +<li> +<p>Readability counts.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>All contributions to <em>cats</em> should keep these important rules in mind.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_procedure">7.2. Procedure</h3> +<div class="paragraph"> +<p><em>cats</em> unlike Clojure and other Clojure contrib libs, does not have many +restrictions for contributions. Just follow the following steps depending on the +situation:</p> +</div> +<div class="paragraph"> +<p><strong>Bugfix</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Fork the GitHub repo.</p> +</li> +<li> +<p>Fix a bug/typo on a new branch.</p> +</li> +<li> +<p>Make a pull-request to master.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p><strong>New feature</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Open new issue with the new feature proposal.</p> +</li> +<li> +<p>If it is accepted, follow the same steps as "bugfix".</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_license">7.3. License</h3> <div class="listingblock"> -<div class="content"><div class="highlight"><pre>Copyright (c) 2014, Andrey Antukh +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014, Andrey Antukh Copyright (c) 2014, Alejandro Gómez All rights reserved. @@ -644,17 +1484,17 @@ <h2 id="_license">License</h2> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -</pre></div></div></div> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</code></pre> +</div> +</div> +</div> </div> </div> </div> -<div id="footnotes"><hr></div> <div id="footer"> <div id="footer-text"> -Version 0.2.0<br> -Last updated 2014-07-16 20:38:54 CEST +Last updated 2014-10-18 20:46:58 CEST </div> </div> </body> -</html> +</html> \ No newline at end of file diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9f1a8f949faea6d5a7768f1aa02b68a648f87979 GIT binary patch literal 5208 zcmV-e6sPNnP)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00004b3#c}2nYxW zd<bNS00009a7bBm000}W000}W0bUxB8~^|S8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H16V*vXK~#90?VWj?71fo;zlT+2iyH`tw8j{hpg0;gL{MVJjJufV zd_Y4qL1UuHn9R6FjWL=;qZ311Mx&z>HIul6pdUnn8r0~3F}NTqk!Euth=PcUG~D^) z+-Kh|>b+N0_tvXwyMLe0`E>QGyWdlHIrrRi#27;-Ixe~tU4Tv$i%tgU;OJz44vtO+ z=-}vNfDVp!&j2FQwZObZMA~&5w#&kcNEZ>AC?b=Aw?$-yh}<tCdp0Ql5h5}TcpF$Q zB6o?%*hb_X9LAV-ML=I*3SeUBBj947YfgFh1g-(rSIPfIpnK76l&Vfe7a(N^GyyMG zX?&L+2eu2G_h*4Q3G$u^Y*BPuec~7Z*aY}nf)1$A+rR|h(E#WUd=q#tMcxkrQgoYr z(iq^zn1-GLoC|!}etB`7F(3F^+M(Gp+_!<nRnmO`7z<noOpAGcLD6mYiD3X>T%>V7 z1Wt|#_Z7Pii0iO-fZthW*b&$?61NwyGjKXE8CYE<oz=h>WAgqMu+9nB0*orU?b<y9 z0Gk6VBb{(ejqu-1F;uSv769+2h%>%M-V-8W7XdwsZo~G@09Qok*9389r0CEzba$P6 z1$Z(N=etF>VJ#}P96&?{0B1QrwE+KCCr(#%xX%MCL`15+G|C0vK|8*J^F*X~PUZ1O z(HvOki@KJ!U(>Z!!gU1>0Db~2C7-XqLJNRPfW4@)(g$vj#JRBOwyfI5MHiq(=WmNH z_S}Zt%Xz;Qx;VT8Sdnw5SEDz8TY=+&eoooOM8d5EHZQtO<EUHRA)+`;L?v%7Mu^Br z;5c9e#f!4HK^J}#fEE#X1h^O2G7|2!Xhabif{t3ffj+=yz%#(3#+VQDD{=%yb6}OP zzZ>v6#eCJFX(2E;GO}F<tgRA$4RAloR9$j!>!Lfm3IiNhf{qJ8%Ye@~_4*+jPiwVk z7BIXcGQdM6=)4d##;H>p`GiX?z?I~6z*Tf-$8`RVz=jfZo-e)R)agj7pCBfs*d35B z6}^ax!$ee|(%x}1fQWQM&oO-4`b-fytA4O_5X+&ZfQa-&_wid5T^3KQLl=I_MdUc( zo<QktK*iuw0;N~F5nwFszw-eeH^wZt&!+`Uw+nEWi0l|L!7}0Wq6-iRA2`qZ1x~vc zaDJ%7O2YsmvMVq$L)1T`+r}Zl0ALV$jz1?{=>T{P_$tsJ6##7qoCN$eCagQJ=F!IE ztsu!CMX&mum2y<>pM*|u;`czMYTcdR&d!i#l-2<!*2(9bNSr@9@7@nkhTL`qr5OQ$ z6EeivTtr5R$Q`K4)@opxh)fcZt&K5P<2MJl0ADf2{8mJoMC2Cqq;WOyu87<uBKx9> zsxI7iUF?y6Eqq->`g^BR^p|hHl3fY^h0Fs6qn(lUuxOrBzSmO3TZ29PL65WZ7y%4$ z&L?FA7@b3!I|DCZwRE$lAtEz?+34CLDK-O6wa>SrBSs!L&^v{qzkd6b{Eqy-lA@>? zE4~FT$SIGveA~Vhf*=uDhOVv~jb*@ebY4FIRq_al<Bc)*0Eoz~=m}qF>|~6YpE-63 zzWy}x|C_)K=+-a9aq)gmIl2IIJ<?hXJPiB_WhjHLJ$AF{cSG+BgdPPp(vEI#Yk=KT zgdKn?Tbyf*8HAp#p9s8^G4Invq@UIEI|^Mlq`@3idby1;W;@_gU?}h@`+f`HArWaZ z#<bY54`wWDHSFXSy96UZMTs)Y7uO6d<Z#uLHmIh`-F1qn0jWGce2<32yN$vrGTw z)Ba^p39B{tuLYh(_3PiVv>N@wwz9M%dUqh}HSycf!<y63YhY>6f^H8NIOSUf^mEF$ z127DDQbZ;gW9|k{5s@XpMH$QN!fWkRb_Q4myn=o~)fiv{x<$)!h_n>A3K)o<L;N~r z{I_iR{!VoUXtC*U1N>e@{@oaJl`-aG5m^dcPj==7-^FtYrhq>Zeqoe^K0sIgBY~$; z9fT_zl=oRq{SPPI#nULg;?@2oV1TDmR(LLOIdBFlKAxVT(Wat9a}zqf7~lu!mv~;v z4!O^k<6FSb&=Da?yopX5jG?-cXgzwly)!_y+qY4A2{;s8^&SLVhTi;5(^yMT9sa(+ zDQtY_@E-J3aS-sE6zRTz-V#0lU6UMvPFuC&YyiIMw8M#HQ-yo3-7)|=>{h$Yn+Ls# z8kne;XEQplx8z)&^|U={{9cAMX8H6%p>hDDwZ6T9Sq=bpq5f*W3HUUAi?bvUVE@Y9 zL1WC%QDIUVto12Cp$uRJFjt`p9d8v`mI5#n*ax^1cveIz2Ue${cL$Qf?-o%3!~P(k zzkU8RI^1rJ?&W_$W2b~7=w;w&TmL3>t80Keoi;i*MSAzQn>7F`YF!EpwErJ(EAgE3 z+fZN<x=ky(vqI8xbf?hGVg3b?Fr)0dZm0k(NxC&{7L<kofZ@PDfaT6_KXNLv0NB-e zw+*_js%EOCz0e2fwe`ME-G-qzi=$y5aKaptF#S79&j7%lw4RVX=KOwFq%!XkG5>-d zs9b_t{VKXM(@--i>Kz=Z&;B*)vH|#<6ZX*r`CMOW2CyBt&?)fk&b$As(g>FjF}{Fa zq5co*@2`ub4^gK6LbUw04u?`-$n@V%_>l?n{6T3M0NrIwjTHEY&ih&?d4B-<R7rO@ zdeb)PJefB=i|YPWH4q7$OfqTTN3^|8Uhkspsbyw>i(?8r!TF-=HO4$(WSu;=N9_j9 z#Qy?jQffg(*q7p1EvZtzT}f}W>Pjd60d>NDsgw)={BxBK8D-z^k)lEV2UWVLm*>{N zc=W8`Zgh7MLN9+csu+4Bx^t;(?gbS$|D3kA1C!D!+M1mCYmKmb`1DgQI)Ngx9cu0* zYAOZPhVK#)ITkgik`(WvYlB}J)vife7C|+Kc5<jc`W3gJ9Ta_DhYF_Vq1U{Zq$npM zauT|O*(OcA2+lFa{LH2|5oNwOY-NmDkvW$fzWg4jWs5j&{RnIJgluwe13V8LOHKw8 zJnFp#s@?QL#(G8RHK2!0yEpO1EEjl}JBNn2u12NiJK-jIHqcUZjWIZM9a7X)(4*YD zNN4&bDSge!>xP*3x0Q+kfG^dl(Bn?ns0<)0twX1hL$Ok}6y+TP9EO!bCXCY^U6@@A zyqZI&yEK<p8xDKMy#IP>7yz}dU9Ul=JK-ni&|vQaPoQTC<5AIb+<ts?Oj+jvpN|RK z1Kp2bh$^3~$+^>`bc9ou=+yezGBLoV2`b~>n*CFQ8gLbGiIeXHs;|sH0FHFRUQT|u zdy~>kr#z=Rzb^~XZ$XZOMdUN6l&&6J!wH*($U6c0qMASz+r!sVT^V*0;3g5N-1c1t zY?^xsYh$Fnfei3lbTJ6(6~!B&^Z|aw##TM!;GSLg3Y2#e%&>pQp#rE{7=Z5e0UpV% zMCtH70AtJ=R8<YsV1+ll89+o%Ko?+1P{atZ&=|AOJ`YP6rxNaY^x&pw94#W7+vkev z`pggsdoh5B^Z~9;5yfSIMvVaO7oSvMQVG|M#xZIw^g!L>V2pVNxX=FehVKY)7U}NI z7r_8qipci%c~-(Wm2jU!*9B$3IOjQ-kHX9hAR?R4)|o@1XwLJ7ta)cZ#ZuS3sOPa- zcm&<<x$(+?kygZxv0H*5@Ywc!lk{7fTb%ew{Qrfbxme#l=vUobCESa^P#dlfZS@$+ zK<9?qwtL9|P<81nQn0B`8hQEksYX9>^6rgZEO`P|Q=5t24C?8Gi4(mRP0yEw0ltv2 z0&|=+?r3o1wV+d0O^1#sbDvLn4OV*{|ArC-9i1`WK<D|zjA>*=S5!niqnfEzYpn8d z;K!8LVD-5AL6RerK7fcULM>%x!BAt&Vi7qAHT6;ymZCZf^U*Vdf1)jemK96UHVm_f z&M^EB$8QKb*`~7z*>A*lbQ)3Q6mW2cI4(v57<G&^+cT|>iZP)Q%EABxJo9uJ==Yv! zbyOS@DxoY4;A_vnNkm52=Q~g}u|{J(s&X|8Ra<`=y{Xek;gk>d6Ok~dlo{3lArv`o zb<(>#Kzd2&CE%y1zrk32LR8!55OlZD+@Nx0r7>yyE{Gfe_)CDozXxn$)BBg48)`0a zc!qikYPBPJfwL_1<DwYg=|B}Y+@{x+e4IpnfQqZTq6bf3L<K>+rL1oc^tyHy{r)`Z z$)XtG)<6}w(MdDvY}uDy$LjZ?%9PEK_j5_9O^i+rMfoU>qjgldI+r&CoEfMBuhA-q zni#NQUaE91x?qhOf~wHNq;$=S-sxWysGK1v_0$%nEW3apiU_D4LB%@v6M@ov2UY5< zIBUKL-RazfP64|D-$w;d2cxcD62lntDr!@BO`!7n!hbuMVFc(!xJ#JF*)#_QNNXK% zNTjTbfWu<yFb3W7tp+yD&<4j)j>DqAHGB%N4G_w@=iWBGApz2w6vL?VYt&(yjdyIu zHn_6{46qhY593)GV4px0s2GbH;hD}VVCzU3ds5@#1o{;l9OFzW+h7OEah9>I4+CU6 z4mQTj!r#8%Tw}~X?6dD&c9m)M)CqtwX00*i<r;COpeJibSoOA4FvcuE*A_*i$tSXp zQs{S3m8q;a13q@He4<A>p!Ne&!5Fh1?Z7^$ErTp*q>;;NX!41inE{M3D^W|=D>FpD z-568RYd;%ZooB^!rd97hEf(3oU(OhRHoBcH5=~yQy;qSs7gn<e5J&f5tzV!v0evr9 zW)g{_SH>z5$W=J{fGN|dbsfGDbaTVk050rYI0Cq)PSCZ$nZ}s0#+X(1w@LV4yqK3U z-j8V20P2g%2^yJyC^UJ+_Wb&zrrdT%1ugfZQ^N}Td>*ii6Rr>8#J>k;DEFRhYzaKm zmxN9qMUDV}_v%AW2G|}oW424oyDm`%vA^#}Si=fCr7Uw7HnvZ=0-X+OY7AFNFNrO` zJjqKI;5!8fdNK4l5xH7KK31wU#%wT^VM3&<hzu8z%g|e`J9y^nVtvZ+6Hz%v1^<hB z@fwIKhUT4rX!Ic6^}M$5907J@V~$*kDvewOT!CJ-^6`mNj}A&v-u|?jtTpHYbO@@a zXn>0|w87XM>z0)E&)SE+Uc=%>kinLY@=QA^2B!#n6|GJk0j@A=vhEFZCvXI6fiw+# zOu>ah=6>{@0?OcdG?C{_5g84f<owi(G6Y8L4n73zB_e4U3Um}K8kwh|PXYrRUN3-% zbVv8=F3vWpnqI*J=$htVQ|8~Ok**dxGz07{BJ~zQ-$#7~RWRKc^M^>7spt{!_@o(& z$nJz)&}K!4W`K(FX8cQ$CiLcS1uf_~MjIGCn0gA>Lqra&lGffL;*JnO@9B9UvFY56 z;JFLfh2mGh1~oh1w@MkOM8aNEqdwoTVV)&MbsXK@TwtFE(s-MJ)hP3kurCAjpgc~V zu81k$F_AFKaIA30gzrnMUBIcd>K67v9Zi1h=MOdBTy&icj{W6^Gk|S~IVETWgQ|h= z<&>)z8+#?K>s$fd8C1e=KyMFM99X@Eo?RS7dDO&T_3FO>3~*Zs8lgf<uzm$lbM5ZC z*(CT<&^`5oF=?+s?IJW$+tW#-X@*b#g>WA~2X%*125bx5CnATVf*n_=bFWEor{1Vc z;4l#x1{?|Oi#mk91vMx0F#h)=Lt>#<>;NOc!4&@$MCk=!d*8Z6>bV>FTL;fVrx!g1 zY*B(nh@<6r`qOdhcp~u*8_GaC6v_a$fs(p_FM|F=9mh^J>NN_L4HR96YUH&5G$za% z0Ca&h#3TNCbS?21`laoR-Wu-hUo^%5vqj|3z<sEh)v7*#tO2QGQHR!{3`MR))#l!` z)C)KewMpzFOnb<;U_qQlWpDsh3ooFCBYuNw?u<oO-=C@#DJ2%61|i-=kB7HJPxS_& z3&{{z1>B4ZqMkrKnw^eLCy5TQ65tqP%w(?=0!;zki1&r-L+@aH=AZ(a%V{4DrPreR zkz3lb_aYz16AMY{A}6;sfUW4|IW_1sTFti(LFEo*xR)14Q3u!ulHbnZ+d=v*AOmbi zeqZQnU|%P%qbSF<ESLU*b3F|`rq08Ym_g+csV}wW$^f>~m*v>Ni?PFM37Oy-tjQZ& zwtaIh+Xcb;EHDG~LUjW3s`!IA;@pxj!8<rYCv-u%B**-k31Ar{7Y48mFfQi?KPQsk z`2{n;*hqP<&oQqS;DDh06`BETBm6qYMp%NQzmIMYR~OXzb0YQbn{!z%3f@;aF+fl9 zm7tA`<oAn$7+_qa9H-=%*JI@1FF6;LE@RAERFd{)9_gc!Iv4**<1c8ujb18ou}@sU z0C*8N!RVFtpvX<9&lvMMDobz9A^A29ZH#HA)z43(Fx_nI#y*sU&&5;di1&I9X$LzC zh=noc6%pAVy&$@Gz@+2O^{+!moPOxK!2R2gFm*Mk1nx!Dcw~}t`CuBl$jr?uS&*}U zx|xXdLM3=U?#`B=#;GO)j~ZjvWhg@&bM!_9HfyR7=t$WGc*_{`evLeOqK8jMqsk;% z9Z;-C4RW55ww`Ix5C-@-Gj+-G4OEGw)=5|kdRuo9s(~}v7*o&PTd5!-0(>52hS8{` zbRcTFHV%~&(HX!Ec3R6F4P}5f8LNZlp{U@bqGGiK6(qf3Lb*gK5k#abdg3?)J#}nB zucog+UEIFc@G=#}0G%iY%5bx%69uA^0XjH38K8rslL0z7IvJpYqmuzTIQ}1U+}%<$ S1(h=Z0000<MNUMnLSTX;hnoig literal 0 HcmV?d00001 From 49f7db114140b85eaf97e7964e9bc6e0ae2dd893 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 19 Oct 2014 18:39:56 +0200 Subject: [PATCH 21/52] Update dev doc --- codox-dev/cats.builtin.html | 2 +- codox-dev/cats.core.html | 2 +- codox-dev/cats.data.html | 2 +- codox-dev/cats.monad.continuation.html | 2 +- codox-dev/cats.monad.either.html | 2 +- codox-dev/cats.monad.exception.html | 8 + codox-dev/cats.monad.html | 2 +- codox-dev/cats.monad.identity.html | 2 +- codox-dev/cats.monad.lazy.html | 2 +- codox-dev/cats.monad.maybe.html | 2 +- codox-dev/cats.monad.reader.html | 2 +- codox-dev/cats.monad.state.html | 2 +- codox-dev/cats.monad.writer.html | 2 +- codox-dev/cats.protocols.html | 2 +- codox-dev/index.html | 2 +- index-dev.html | 273 +++++++++++++++---------- 16 files changed, 189 insertions(+), 120 deletions(-) create mode 100644 codox-dev/cats.monad.exception.html diff --git a/codox-dev/cats.builtin.html b/codox-dev/cats.builtin.html index 08092b4..3b36057 100644 --- a/codox-dev/cats.builtin.html +++ b/codox-dev/cats.builtin.html @@ -1,3 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. </pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.core.html b/codox-dev/cats.core.html index d4c22a2..ba6703f 100644 --- a/codox-dev/cats.core.html +++ b/codox-dev/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure </pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. diff --git a/codox-dev/cats.data.html b/codox-dev/cats.data.html index e64cf36..d0424d1 100644 --- a/codox-dev/cats.data.html +++ b/codox-dev/cats.data.html @@ -1,4 +1,4 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. </pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. </pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.continuation.html b/codox-dev/cats.monad.continuation.html index 50d695a..4f0ecdc 100644 --- a/codox-dev/cats.monad.continuation.html +++ b/codox-dev/cats.monad.continuation.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. </pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. </pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. </pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the diff --git a/codox-dev/cats.monad.either.html b/codox-dev/cats.monad.either.html index df207f1..9d06e80 100644 --- a/codox-dev/cats.monad.either.html +++ b/codox-dev/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. </pre></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Either. </pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. </pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. diff --git a/codox-dev/cats.monad.exception.html b/codox-dev/cats.monad.exception.html new file mode 100644 index 0000000..3200279 --- /dev/null +++ b/codox-dev/cats.monad.exception.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. + +The Try type represents a computation that may either result in an exception, +or return a successfully computed value. It's similar to, but semantically +different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. +</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. +</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.html b/codox-dev/cats.monad.html index 4e3887d..0216531 100644 --- a/codox-dev/cats.monad.html +++ b/codox-dev/cats.monad.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.identity.html b/codox-dev/cats.monad.identity.html index 1211459..a465d9b 100644 --- a/codox-dev/cats.monad.identity.html +++ b/codox-dev/cats.monad.identity.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. </pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. </pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. </pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.lazy.html b/codox-dev/cats.monad.lazy.html index 62fe1a7..d6c3bb6 100644 --- a/codox-dev/cats.monad.lazy.html +++ b/codox-dev/cats.monad.lazy.html @@ -1,3 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. </pre></div><div class="public anchor" id="var-lazy-monad"><h3>lazy-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lazy-transformer"><h3>lazy-transformer</h3><div class="usage"><code>(lazy-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.maybe.html b/codox-dev/cats.monad.maybe.html index 4ad35d7..c281b39 100644 --- a/codox-dev/cats.monad.maybe.html +++ b/codox-dev/cats.monad.maybe.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. </pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. </pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. </pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. diff --git a/codox-dev/cats.monad.reader.html b/codox-dev/cats.monad.reader.html index dafedb8..de89766 100644 --- a/codox-dev/cats.monad.reader.html +++ b/codox-dev/cats.monad.reader.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. </pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. </pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function to Reader class instance. diff --git a/codox-dev/cats.monad.state.html b/codox-dev/cats.monad.state.html index f78008f..8b193dc 100644 --- a/codox-dev/cats.monad.state.html +++ b/codox-dev/cats.monad.state.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. </pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. </pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant diff --git a/codox-dev/cats.monad.writer.html b/codox-dev/cats.monad.writer.html index e1e5148..8be27fe 100644 --- a/codox-dev/cats.monad.writer.html +++ b/codox-dev/cats.monad.writer.html @@ -1,3 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. </pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.protocols.html b/codox-dev/cats.protocols.html index a53626d..34fb37b 100644 --- a/codox-dev/cats.protocols.html +++ b/codox-dev/cats.protocols.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. </pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. diff --git a/codox-dev/index.html b/codox-dev/index.html index 90d2507..7204191 100644 --- a/codox-dev/index.html +++ b/codox-dev/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3EEither">->Either</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3EEither">->Either</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index-dev.html b/index-dev.html index a8a5634..6876980 100644 --- a/index-dev.html +++ b/index-dev.html @@ -505,17 +505,36 @@ <h1>Category Theory abstractions for Clojure</h1> <li><a href="#_monad">4.3. Monad</a></li> </ul> </li> -<li><a href="#_clojure_types">5. Clojure Types</a></li> -<li><a href="#_faq">6. FAQ</a> +<li><a href="#_monad_types">5. Monad types</a> <ul class="sectlevel2"> -<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> +<li><a href="#_maybe">5.1. Maybe</a></li> +<li><a href="#_either">5.2. Either</a></li> +<li><a href="#_try">5.3. Try</a></li> +<li><a href="#_state">5.4. State</a></li> +<li><a href="#_reader">5.5. Reader</a></li> +<li><a href="#_writer">5.6. Writer</a></li> +<li><a href="#_continuation">5.7. Continuation</a></li> +<li><a href="#_lazy">5.8. Lazy</a></li> +<li><a href="#_vector">5.9. Vector</a></li> </ul> </li> -<li><a href="#_how_to_contribute">7. How to Contribute?</a> +<li><a href="#_monad_transformers">6. Monad Transformers</a> <ul class="sectlevel2"> -<li><a href="#_philosophy">7.1. Philosophy</a></li> -<li><a href="#_procedure">7.2. Procedure</a></li> -<li><a href="#_license">7.3. License</a></li> +<li><a href="#_motivation">6.1. Motivation</a></li> +<li><a href="#_using_monad_transformers">6.2. Using monad transformers</a></li> +</ul> +</li> +<li><a href="#_faq">7. FAQ</a> +<ul class="sectlevel2"> +<li><a href="#_what_are_the_difference_with_other_existing_libraries">7.1. What are the difference with other existing libraries?</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.2. What clojure types implements some of the Category Theory abstractions?</a></li> +</ul> +</li> +<li><a href="#_how_to_contribute">8. How to Contribute?</a> +<ul class="sectlevel2"> +<li><a href="#_philosophy">8.1. Philosophy</a></li> +<li><a href="#_procedure">8.2. Procedure</a></li> +<li><a href="#_license">8.3. License</a></li> </ul> </li> </ul> @@ -855,34 +874,31 @@ <h3 id="_monad">4.3. Monad</h3> <div class="paragraph"> <p>The monad abstraction consists on two functions: <strong>bind</strong> and <strong>return</strong></p> </div> -<div class="paragraph"> -<p><strong>bind</strong> function has the following signature:</p> -</div> <div class="listingblock"> +<div class="title">Bind function signature.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> -<p>Let see one example:</p> +<p>As you can observe, it works much like Functor but with inverted arguments, the main deference is +that in monad, the function is a responsible of wrapping a retuned value in a context.</p> </div> <div class="listingblock"> +<div class="title">Usage example of bind high order function.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> </div> </div> <div class="paragraph"> -<p>As you can observe, it works much like Functor but with inverted arguments, the main deference is -that in monad, the function is a responsible of wrapping a retuned value in a context.</p> -</div> -<div class="paragraph"> <p>One of the key features of the bind function is that any computation executed inside of context of bind (monad) knows the context type implicitly. Having this, if you apply some computation over some monadic value and you want to return the result in the same container context but you don’t know that container is it, you can use <code>return</code> or <code>pure</code> functions:</p> </div> <div class="listingblock"> +<div class="title">Usage of return function in bind context.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> @@ -900,6 +916,7 @@ <h3 id="_monad">4.3. Monad</h3> functions. But that is happens where the number of computations increases:</p> </div> <div class="listingblock"> +<div class="title">Composability example of bind function.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> @@ -912,6 +929,14 @@ <h3 id="_monad">4.3. Monad</h3> <p>This easy grows to very beatiful callback hell. For solve this, <em>cats</em> comes with powerful macro: <strong>mlet</strong></p> </div> +<div class="listingblock"> +<div class="title">Previous example but using <strong>mlet</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> <div class="admonitionblock note"> <table> <tr> @@ -919,22 +944,12 @@ <h3 id="_monad">4.3. Monad</h3> <div class="title">Note</div> </td> <td class="content"> -If you are coming from haskell, it represents the <code>do-syntax</code> of haskell. +If you are coming from haskell, it represents the <strong>do-syntax</strong>. </td> </tr> </table> </div> <div class="paragraph"> -<p>Let see the same example but translated to more clear code using mlet macro:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -<div class="paragraph"> <p>If you want to use regular (non-monadic) let bindings inside a <code>mlet</code> block, you can do so using <code>:let</code> and a bindings vector as a pair inside the mlet bindings:</p> </div> @@ -946,16 +961,20 @@ <h3 id="_monad">4.3. Monad</h3> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> -<div class="sect3"> -<h4 id="_monad_types">4.3.1. Monad types</h4> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_monad_types">5. Monad types</h2> +<div class="sectionbody"> <div class="paragraph"> <p>Monad as is, is an abstraction, and we have seen two types in examples that implements the monad abstraction: Maybe and Either. But they are the smallest part of types that implements the Monad abstraction. In this section we try explain different monad types supported by <em>cats</em> library.</p> </div> -<div class="sect4"> -<h5 id="_maybe">Maybe</h5> +<div class="sect2"> +<h3 id="_maybe">5.1. Maybe</h3> <div class="paragraph"> <p>This is one of the two most used monad types (commonly named Optional in non-functional programming languages).</p> @@ -980,6 +999,7 @@ <h5 id="_maybe">Maybe</h5> </ul> </div> <div class="listingblock"> +<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> @@ -1001,8 +1021,8 @@ <h5 id="_maybe">Maybe</h5> </table> </div> </div> -<div class="sect4"> -<h5 id="_either">Either</h5> +<div class="sect2"> +<h3 id="_either">5.2. Either</h3> <div class="paragraph"> <p>Either is another type that represents a result of computation, but in contrast with maybe it can return some data with a failed computation result.</p> @@ -1021,6 +1041,7 @@ <h5 id="_either">Either</h5> </ul> </div> <div class="listingblock"> +<div class="title">Usage example of <strong>Either</strong> constructors.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> @@ -1044,8 +1065,65 @@ <h5 id="_either">Either</h5> </table> </div> </div> -<div class="sect4"> -<h5 id="_state">State</h5> +<div class="sect2"> +<h3 id="_try">5.3. Try</h3> +<div class="paragraph"> +<p>Also called Exception.</p> +</div> +<div class="paragraph"> +<p>The <code>Try</code> type represents a computation that may either result in an exception, +or return a successfully computed value. It’s similar to, but semantically +different from the <code>Either</code> type.</p> +</div> +<div class="paragraph"> +<p>In <em>cats</em> it has two constructors and one convenience macro:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>(success v)</code>: constructor for type that represents a successful result.</p> +</li> +<li> +<p><code>(failure e)</code>: constructor for type that represents a failure (with exception as value).</p> +</li> +<li> +<p><code>(try-on)</code>: macro that encapsulates all expresions in a success or failure.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>try-on</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [1]></span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Failure [#<NullPointerException java.lang.NullPointerException>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>It’s an analogue for the try-catch block: it replaces try-catch’s stack based error +handling with heap based error handling. Instead of having an exception thrown and +having to deal with it immediately in the same thread, it disconnects the error +handling and recovery.</p> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Try is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_state">5.4. State</h3> <div class="paragraph"> <p>State monad in one of the special use cases of monads most used in haskell. It has different purposes including: lazy computation composition and maintaining state without explicit state.</p> @@ -1143,41 +1221,43 @@ <h5 id="_state">State</h5> any other contribution is always welcome.</p> </div> </div> -<div class="sect4"> -<h5 id="_reader">Reader</h5> +<div class="sect2"> +<h3 id="_reader">5.5. Reader</h3> <div class="paragraph"> <p>TODO</p> </div> </div> -<div class="sect4"> -<h5 id="_writer">Writer</h5> +<div class="sect2"> +<h3 id="_writer">5.6. Writer</h3> <div class="paragraph"> <p>TODO</p> </div> </div> -<div class="sect4"> -<h5 id="_continuation">Continuation</h5> +<div class="sect2"> +<h3 id="_continuation">5.7. Continuation</h3> <div class="paragraph"> <p>TODO</p> </div> </div> -<div class="sect4"> -<h5 id="_lazy">Lazy</h5> +<div class="sect2"> +<h3 id="_lazy">5.8. Lazy</h3> <div class="paragraph"> <p>TODO</p> </div> </div> -<div class="sect4"> -<h5 id="_vector">Vector</h5> +<div class="sect2"> +<h3 id="_vector">5.9. Vector</h3> <div class="paragraph"> <p>TODO</p> </div> </div> </div> -<div class="sect3"> -<h4 id="_monad_transformers">4.3.2. Monad Transformers</h4> -<div class="sect4"> -<h5 id="_motivation">Motivation</h5> +</div> +<div class="sect1"> +<h2 id="_monad_transformers">6. Monad Transformers</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_motivation">6.1. Motivation</h3> <div class="paragraph"> <p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> @@ -1210,8 +1290,8 @@ <h5 id="_motivation">Motivation</h5> monad transformer is itself a monad.</p> </div> </div> -<div class="sect4"> -<h5 id="_using_monad_transformers">Using monad transformers</h5> +<div class="sect2"> +<h3 id="_using_monad_transformers">6.2. Using monad transformers</h3> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad, since we want the resulting type to be a stateful computation @@ -1234,6 +1314,7 @@ <h5 id="_using_monad_transformers">Using monad transformers</h5> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> + <span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> </div> </div> @@ -1248,10 +1329,10 @@ <h5 id="_using_monad_transformers">Using monad transformers</h5> a regular monad.</p> </div> <div class="paragraph"> -<p>TODO: better explanation of the above</p> +<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> </div> <div class="paragraph"> -<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe. Let’s see it in action:</p> +<p>Let’s see it in action:</p> </div> <div class="listingblock"> <div class="content"> @@ -1300,34 +1381,43 @@ <h5 id="_using_monad_transformers">Using monad transformers</h5> <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> </div> </div> -<div class="paragraph"> -<p>TODO: Implement simple parser as an example of transformer usage</p> -</div> -</div> -</div> </div> </div> </div> <div class="sect1"> -<h2 id="_clojure_types">5. Clojure Types</h2> +<h2 id="_faq">7. FAQ</h2> <div class="sectionbody"> +<div class="sect2"> +<h3 id="_what_are_the_difference_with_other_existing_libraries">7.1. What are the difference with other existing libraries?</h3> <div class="paragraph"> -<p>Besides the own types, some clojure types has implementations for previously explained -category theory abstractions.</p> +<p>This is an incomplete list of differences with other existing libraries:</p> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types +<div class="ulist"> +<ul> +<li> +<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling +is slighty limited (e.g. you always need to specify what monad you want use instead of +relying on the type). And obviously because it only has monads.</p> +</li> +<li> +<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big +difference with fluokitten is that <code>cats</code> doesn’t aim to extend every clojure type +with monadic protocols, for the obvious reason that monad; functor and applicative represents +context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> +</li> +<li> +<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation +has much unnecesary complexity.</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.2. What clojure types implements some of the Category Theory abstractions?</h3> +<div class="paragraph"> +<p>In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types that don’t act like containers. For example, clojure keywords are values but can not be containers so -they should not extend any of the previously explained protocols. -</td> -</tr> -</table> +they should not extend any of the previously explained protocols.</p> </div> <table class="tableblock frame-all grid-all spread"> <caption class="title">Table 1. Summary of clojure types and implemented protocols</caption> @@ -1358,41 +1448,12 @@ <h2 id="_clojure_types">5. Clojure Types</h2> </table> </div> </div> -<div class="sect1"> -<h2 id="_faq">6. FAQ</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> -<div class="paragraph"> -<p>This is an incomplete list of differences with other existing libraries:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling -is slighty limited (e.g. you always need to specify what monad you want use instead of -relying on the type). And obviously because it only has monads.</p> -</li> -<li> -<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big -difference with fluokitten is that <code>cats</code> doesn’t aim to extend every clojure type -with monadic protocols, for the obvious reason that monad; functor and applicative represents -context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> -</li> -<li> -<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation -has much unnecesary complexity.</p> -</li> -</ul> -</div> -</div> -</div> </div> <div class="sect1"> -<h2 id="_how_to_contribute">7. How to Contribute?</h2> +<h2 id="_how_to_contribute">8. How to Contribute?</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_philosophy">7.1. Philosophy</h3> +<h3 id="_philosophy">8.1. Philosophy</h3> <div class="paragraph"> <p>Five most important rules:</p> </div> @@ -1420,7 +1481,7 @@ <h3 id="_philosophy">7.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_procedure">7.2. Procedure</h3> +<h3 id="_procedure">8.2. Procedure</h3> <div class="paragraph"> <p><em>cats</em> unlike Clojure and other Clojure contrib libs, does not have many restrictions for contributions. Just follow the following steps depending on the @@ -1457,7 +1518,7 @@ <h3 id="_procedure">7.2. Procedure</h3> </div> </div> <div class="sect2"> -<h3 id="_license">7.3. License</h3> +<h3 id="_license">8.3. License</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014, Andrey Antukh @@ -1493,7 +1554,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2014-10-18 20:46:58 CEST +Last updated 2014-10-19 18:38:53 CEST </div> </div> </body> From aad027a24bd6de16ad954a3ccb233c73576e1fbf Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Tue, 21 Oct 2014 21:31:19 +0200 Subject: [PATCH 22/52] Update dev doc --- codox-dev/cats.monad.either.html | 11 +++--- codox-dev/cats.monad.exception.html | 5 +-- codox-dev/index.html | 2 +- index-dev.html | 54 +++++++++++++++++++---------- 4 files changed, 45 insertions(+), 27 deletions(-) diff --git a/codox-dev/cats.monad.either.html b/codox-dev/cats.monad.either.html index 9d06e80..61e3507 100644 --- a/codox-dev/cats.monad.either.html +++ b/codox-dev/cats.monad.either.html @@ -1,7 +1,8 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. -</pre></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Either. -</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. +</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. +</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. </pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.exception.html b/codox-dev/cats.monad.exception.html index 3200279..9baea4a 100644 --- a/codox-dev/cats.monad.exception.html +++ b/codox-dev/cats.monad.exception.html @@ -1,8 +1,9 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. The Try type represents a computation that may either result in an exception, or return a successfully computed value. It's similar to, but semantically different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. </pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. -</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. +</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/index.html b/codox-dev/index.html index 7204191..3392b6e 100644 --- a/codox-dev/index.html +++ b/codox-dev/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3EEither">->Either</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index-dev.html b/index-dev.html index 6876980..c85888c 100644 --- a/index-dev.html +++ b/index-dev.html @@ -1076,20 +1076,10 @@ <h3 id="_try">5.3. Try</h3> different from the <code>Either</code> type.</p> </div> <div class="paragraph"> -<p>In <em>cats</em> it has two constructors and one convenience macro:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>(success v)</code>: constructor for type that represents a successful result.</p> -</li> -<li> -<p><code>(failure e)</code>: constructor for type that represents a failure (with exception as value).</p> -</li> -<li> -<p><code>(try-on)</code>: macro that encapsulates all expresions in a success or failure.</p> -</li> -</ul> +<p>It’s an analogue for the try-catch block: it replaces try-catch’s stack based error +handling with heap based error handling. Instead of having an exception thrown and +having to deal with it immediately in the same thread, it disconnects the error +handling and recovery.</p> </div> <div class="listingblock"> <div class="title">Usage example of <strong>try-on</strong> macro.</div> @@ -1104,10 +1094,28 @@ <h3 id="_try">5.3. Try</h3> </div> </div> <div class="paragraph"> -<p>It’s an analogue for the try-catch block: it replaces try-catch’s stack based error -handling with heap based error handling. Instead of having an exception thrown and -having to deal with it immediately in the same thread, it disconnects the error -handling and recovery.</p> +<p>For make it more powerfull, <em>cats</em> comes with other sugar syntax macros: <code>try-or-else</code> that +returns a default value if a computation fails and <code>try-or-recover</code> that make the +facility of handle yourself the return value executing a function with the exception as +first parameter.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-else</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [2]></span></code></pre> +</div> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-recover</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">cond</span> + <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> + <span class="tok-ss">:else</span> <span class="tok-mi">100</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Success [0]></span></code></pre> +</div> </div> <div class="admonitionblock note"> <table> @@ -1121,6 +1129,14 @@ <h3 id="_try">5.3. Try</h3> </tr> </table> </div> +<div class="sect3"> +<h4 id="_clojurescript_notes">5.3.1. ClojureScript Notes</h4> +<div class="paragraph"> +<p>Sugar syntax <code>try-on</code>, <code>try-or-else</code> and <code>try-or-recover</code> macros are only +compatible with Clojure, if you want use them in your project, you should +reimplement them in your codebase.</p> +</div> +</div> </div> <div class="sect2"> <h3 id="_state">5.4. State</h3> @@ -1554,7 +1570,7 @@ <h3 id="_license">8.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2014-10-19 18:38:53 CEST +Last updated 2014-10-21 21:30:40 CEST </div> </div> </body> From 1224d9f3fcf8beef45215e6ad743c9ac5354f991 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Fri, 24 Oct 2014 20:02:09 +0200 Subject: [PATCH 23/52] Update dev doc --- codox-dev/cats.monad.exception.html | 4 ++-- codox-dev/index.html | 2 +- index-dev.html | 14 +++----------- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/codox-dev/cats.monad.exception.html b/codox-dev/cats.monad.exception.html index 9baea4a..152d401 100644 --- a/codox-dev/cats.monad.exception.html +++ b/codox-dev/cats.monad.exception.html @@ -1,9 +1,9 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. The Try type represents a computation that may either result in an exception, or return a successfully computed value. It's similar to, but semantically different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. </pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. -</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. +</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. </pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/index.html b/codox-dev/index.html index 3392b6e..f003593 100644 --- a/codox-dev/index.html +++ b/codox-dev/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index-dev.html b/index-dev.html index c85888c..1648834 100644 --- a/index-dev.html +++ b/index-dev.html @@ -6,7 +6,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="Asciidoctor 1.5.1"> <meta name="author" content="Andrey Antukh & Alejandro Gómez"> -<title>Category Theory abstractions for Clojure</title> +<title>Cats Documentation</title> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"> <style> /* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ @@ -477,7 +477,7 @@ </head> <body class="article toc2 toc-left"> <div id="header"> -<h1>Category Theory abstractions for Clojure</h1> +<h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> <span id="revdate">0.2.0</span> @@ -1129,14 +1129,6 @@ <h3 id="_try">5.3. Try</h3> </tr> </table> </div> -<div class="sect3"> -<h4 id="_clojurescript_notes">5.3.1. ClojureScript Notes</h4> -<div class="paragraph"> -<p>Sugar syntax <code>try-on</code>, <code>try-or-else</code> and <code>try-or-recover</code> macros are only -compatible with Clojure, if you want use them in your project, you should -reimplement them in your codebase.</p> -</div> -</div> </div> <div class="sect2"> <h3 id="_state">5.4. State</h3> @@ -1570,7 +1562,7 @@ <h3 id="_license">8.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2014-10-21 21:30:40 CEST +Last updated 2014-10-24 20:01:29 CEST </div> </div> </body> From c0f52642784787a9a31f898ca9c13b6f14e3070e Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 25 Oct 2014 01:30:07 +0200 Subject: [PATCH 24/52] Update dev doc --- index-dev.html | 297 ++++++++++++++++++++++++------------------------- 1 file changed, 145 insertions(+), 152 deletions(-) diff --git a/index-dev.html b/index-dev.html index 1648834..564cd19 100644 --- a/index-dev.html +++ b/index-dev.html @@ -503,6 +503,7 @@ <h1>Cats Documentation</h1> <li><a href="#_functor">4.1. Functor</a></li> <li><a href="#_applicative">4.2. Applicative</a></li> <li><a href="#_monad">4.3. Monad</a></li> +<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> </ul> </li> <li><a href="#_monad_types">5. Monad types</a> @@ -518,23 +519,17 @@ <h1>Cats Documentation</h1> <li><a href="#_vector">5.9. Vector</a></li> </ul> </li> -<li><a href="#_monad_transformers">6. Monad Transformers</a> +<li><a href="#_faq">6. FAQ</a> <ul class="sectlevel2"> -<li><a href="#_motivation">6.1. Motivation</a></li> -<li><a href="#_using_monad_transformers">6.2. Using monad transformers</a></li> +<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</a></li> </ul> </li> -<li><a href="#_faq">7. FAQ</a> +<li><a href="#_how_to_contribute">7. How to Contribute?</a> <ul class="sectlevel2"> -<li><a href="#_what_are_the_difference_with_other_existing_libraries">7.1. What are the difference with other existing libraries?</a></li> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.2. What clojure types implements some of the Category Theory abstractions?</a></li> -</ul> -</li> -<li><a href="#_how_to_contribute">8. How to Contribute?</a> -<ul class="sectlevel2"> -<li><a href="#_philosophy">8.1. Philosophy</a></li> -<li><a href="#_procedure">8.2. Procedure</a></li> -<li><a href="#_license">8.3. License</a></li> +<li><a href="#_philosophy">7.1. Philosophy</a></li> +<li><a href="#_procedure">7.2. Procedure</a></li> +<li><a href="#_license">7.3. License</a></li> </ul> </li> </ul> @@ -962,6 +957,135 @@ <h3 id="_monad">4.3. Monad</h3> </div> </div> </div> +<div class="sect2"> +<h3 id="_monad_transformers">4.4. Monad Transformers</h3> +<div class="sect3"> +<h4 id="_motivation">4.4.1. Motivation</h4> +<div class="paragraph"> +<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, +we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> + <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> + +<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> +<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> +<span class="tok-c1">; contain a value of any type.</span> +<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> +<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>However, monads don’t compose as nicely as functors do. We have to actually implement +the composition ourselves.</p> +</div> +<div class="paragraph"> +<p>In some circumstances we would like combine the effects of two monads in another one. We call the +resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A +monad transformer is itself a monad.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> +<div class="paragraph"> +<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer +using State as the base monad, since we want the resulting type to be a stateful computation +that may fail: <code>s -> Maybe (a, s)</code>.</p> +</div> +<div class="paragraph"> +<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with +any other monad. The transformer creating functions take a Monad as their argument and their +return a reified MonadTrans:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> + +<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful +function that, when run, yields a Maybe containing a pair (value, next state).</p> +</div> +<div class="paragraph"> +<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. +When working with monad transformers we have to be explicit about what monad are we using to implement +the binding policy since there is no way to distinguish values from a transformer type from those of +a regular monad.</p> +</div> +<div class="paragraph"> +<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> +</div> +<div class="paragraph"> +<p>Let’s see it in action:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> + <span class="tok-s">"A function that takes an input string as an state and</span> +<span class="tok-s"> consumes one character yielding it as a the value. The</span> +<span class="tok-s"> new state is the input string with the character consumed.</span> + +<span class="tok-s"> It fails when there isn't a character to consume."</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Nothing ></span> + +<span class="tok-c1">; We could have written `any-two-chars` more succintly using `cats.core/mlet-with`,</span> +<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> + +<span class="tok-c1">; We also define a function for applying parser to a given input</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +</div> +</div> </div> </div> <div class="sect1"> @@ -1262,141 +1386,10 @@ <h3 id="_vector">5.9. Vector</h3> </div> </div> <div class="sect1"> -<h2 id="_monad_transformers">6. Monad Transformers</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_motivation">6.1. Motivation</h3> -<div class="paragraph"> -<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, -we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> - <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> - -<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> -<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> -<span class="tok-c1">; contain a value of any type.</span> -<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> -<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>However, monads don’t compose as nicely as functors do. We have to actually implement -the composition ourselves.</p> -</div> -<div class="paragraph"> -<p>In some circumstances we would like combine the effects of two monads in another one. We call the -resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A -monad transformer is itself a monad.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_using_monad_transformers">6.2. Using monad transformers</h3> -<div class="paragraph"> -<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer -using State as the base monad, since we want the resulting type to be a stateful computation -that may fail: <code>s -> Maybe (a, s)</code>.</p> -</div> -<div class="paragraph"> -<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with -any other monad. The transformer creating functions take a Monad as their argument and their -return a reified MonadTrans:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> - -<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful -function that, when run, yields a Maybe containing a pair (value, next state).</p> -</div> -<div class="paragraph"> -<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. -When working with monad transformers we have to be explicit about what monad are we using to implement -the binding policy since there is no way to distinguish values from a transformer type from those of -a regular monad.</p> -</div> -<div class="paragraph"> -<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> -</div> -<div class="paragraph"> -<p>Let’s see it in action:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> - <span class="tok-s">"A function that takes an input string as an state and</span> -<span class="tok-s"> consumes one character yielding it as a the value. The</span> -<span class="tok-s"> new state is the input string with the character consumed.</span> - -<span class="tok-s"> It fails when there isn't a character to consume."</span> - <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Nothing ></span> - -<span class="tok-c1">; We could have written `any-two-chars` more succintly using `cats.core/mlet-with`,</span> -<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> - -<span class="tok-c1">; We also define a function for applying parser to a given input</span> -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> -</div> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_faq">7. FAQ</h2> +<h2 id="_faq">6. FAQ</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_what_are_the_difference_with_other_existing_libraries">7.1. What are the difference with other existing libraries?</h3> +<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> <div class="paragraph"> <p>This is an incomplete list of differences with other existing libraries:</p> </div> @@ -1421,7 +1414,7 @@ <h3 id="_what_are_the_difference_with_other_existing_libraries">7.1. What are th </div> </div> <div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.2. What clojure types implements some of the Category Theory abstractions?</h3> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</h3> <div class="paragraph"> <p>In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types that don’t act like containers. For example, clojure keywords are values but can not be containers so @@ -1458,10 +1451,10 @@ <h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions" </div> </div> <div class="sect1"> -<h2 id="_how_to_contribute">8. How to Contribute?</h2> +<h2 id="_how_to_contribute">7. How to Contribute?</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_philosophy">8.1. Philosophy</h3> +<h3 id="_philosophy">7.1. Philosophy</h3> <div class="paragraph"> <p>Five most important rules:</p> </div> @@ -1489,7 +1482,7 @@ <h3 id="_philosophy">8.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_procedure">8.2. Procedure</h3> +<h3 id="_procedure">7.2. Procedure</h3> <div class="paragraph"> <p><em>cats</em> unlike Clojure and other Clojure contrib libs, does not have many restrictions for contributions. Just follow the following steps depending on the @@ -1526,7 +1519,7 @@ <h3 id="_procedure">8.2. Procedure</h3> </div> </div> <div class="sect2"> -<h3 id="_license">8.3. License</h3> +<h3 id="_license">7.3. License</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014, Andrey Antukh @@ -1562,7 +1555,7 @@ <h3 id="_license">8.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2014-10-24 20:01:29 CEST +Last updated 2014-10-25 01:28:38 CEST </div> </div> </body> From 6581ab5500a1e0ef5bf15af49e499c1f6e7bd558 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 26 Oct 2014 13:42:56 +0100 Subject: [PATCH 25/52] Update dev doc --- codox/cats.builtin.html | 3 + codox/cats.core.html | 124 +- codox/cats.data.html | 4 + codox/cats.monad.continuation.html | 6 + codox/cats.monad.either.html | 8 + codox/cats.monad.exception.html | 14 + codox/cats.monad.html | 2 + codox/cats.monad.identity.html | 5 + codox/cats.monad.lazy.html | 3 + codox/cats.monad.maybe.html | 12 + codox/cats.monad.reader.html | 10 + codox/cats.monad.state.html | 31 + codox/cats.monad.writer.html | 3 + codox/cats.protocols.html | 34 +- codox/cats.types.html | 25 - codox/index.html | 2 +- index.html | 1874 ++++++++++++++++++++-------- 17 files changed, 1586 insertions(+), 574 deletions(-) create mode 100644 codox/cats.builtin.html create mode 100644 codox/cats.data.html create mode 100644 codox/cats.monad.continuation.html create mode 100644 codox/cats.monad.either.html create mode 100644 codox/cats.monad.exception.html create mode 100644 codox/cats.monad.html create mode 100644 codox/cats.monad.identity.html create mode 100644 codox/cats.monad.lazy.html create mode 100644 codox/cats.monad.maybe.html create mode 100644 codox/cats.monad.reader.html create mode 100644 codox/cats.monad.state.html create mode 100644 codox/cats.monad.writer.html delete mode 100644 codox/cats.types.html diff --git a/codox/cats.builtin.html b/codox/cats.builtin.html new file mode 100644 index 0000000..f39b785 --- /dev/null +++ b/codox/cats.builtin.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.core.html b/codox/cats.core.html index 8937f52..2052637 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,68 +1,61 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*m-context*"><div class="inner"><span>*m-context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-context"><div class="inner"><span>with-context</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*m-context*"><h3>*m-context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. +</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, +ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. Example: (>>= (just 1) (comp just inc) (comp just inc)) ;=> #<Just [3]> </pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -value, ignoring the state. -Equivalent to taking the first value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -state. -Equivalent to taking the second value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside +applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside av's context, applies the function to value and return a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, returning the identity element when the predicate yields false. Otherwise, returns the instance unchanged. - (require '[cats.types :as t]) + (require '[cats.monad.moaybe :as maybe]) (require '[cats.core :as m]) - (m/filter (partial < 2) (t/just 3)) + (m/filter (partial < 2) (maybe/just 3)) ;=> <Just [3]> - (m/filter (partial < 4) (t/just 3)) + (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> </pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. -(require '[cats.types :as t]) +(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) -(m/forseq [2 3] t/just) +(m/forseq [2 3] maybe/just) ;=> <Just [[2 3]]> (m/forseq [1 2] (fn [v] (if (odd? v) - (t/just v) - (t/nothing)))) + (maybe/just v) + (maybe/nothing)))) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><h4 class="type">macro</h4><div class="usage"><code>(lift n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a +</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value +of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a monadic context. - (require '[cats.types :as t]) + (require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) - (def monad+ (m/lift 2 +)) + (def monad+ (m/lift-m 2 +)) - (monad+ (t/just 1) (t/just 2)) + (monad+ (maybe/just 1) (maybe/just 2)) ;=> <Just [3]> - (monad+ (t/just 1) (t/nothing)) + (monad+ (maybe/just 1) (maybe/nothing)) ;=> <Nothing> (monad+ [0 2 4] [1 2]) @@ -71,52 +64,77 @@ monadic context, map it into the given collection calling sequence on the results. - (require '[cats.types :as t]) + (require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) - (m/mapseq t/just [2 3]) + (m/mapseq maybe/just [2 3]) ;=> <Just [[2 3]]> (m/mapseq (fn [v] (if (odd? v) - (t/just v) - (t/nothing))) + (maybe/just v) + (maybe/nothing))) [1 2]) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure av v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure +let. This allows much easy composition of monadic +computations. + +Let see one example for understand how it works, this is +a code using bind for compose few number of operations: + + + (bind (just 1) + (fn [a] + (bind (just (inc a)) + (fn [b] + (return (* b 2)))))) + ;=> #<Just [4]> + +Now see how this code can be more clear if you +are using mlet macro for do it: + + (mlet [a (just 1) + b (just (inc a))] + (return (* b 2))) + ;=> #<Just [4]> +</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the +same as mlet but specifying the monadic context. +So, instead of writing: + + (with-monad (maybe-transformer vector-monad) + (mlet [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2)))) + ;=> [#<Just [4]> #<Just [6]>] + +You can just write: + + (mlet-with (maybe-transformer vector-monad) + [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2))) + ;=> [#<Just [4]> #<Just [6]>] +</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With pure/2, you can force a specific context -value.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces -the current state with specified new state.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"></div><div class="doc"><pre class="plaintext">This is a monad version of pure. -</pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and returns a Pair -instance with result and new state. - - (def computation (mlet [x (get-state) - y (put-state (inc x))] - (return y))) - - (def initial-state 1) - (run-state computation initial-state) - -This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect +value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context. - (require '[cats.types :as t]) + (require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) - (m/sequence [(t/just 2) (t/just 3)]) + (m/sequence [(maybe/just 2) (maybe/just 3)]) ;=> <Just [[2, 3]]> - (m/sequence [(t/nothing) (t/just 3)]) + (m/sequence [(maybe/nothing) (maybe/just 3)]) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the -specified function to state and returns the old state.</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. +</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-context"><h3>with-context</h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.data.html b/codox/cats.data.html new file mode 100644 index 0000000..cddafca --- /dev/null +++ b/codox/cats.data.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. +</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.continuation.html b/codox/cats.monad.continuation.html new file mode 100644 index 0000000..8f7333d --- /dev/null +++ b/codox/cats.monad.continuation.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. +</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.either.html b/codox/cats.monad.either.html new file mode 100644 index 0000000..309956e --- /dev/null +++ b/codox/cats.monad.either.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. +</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. +</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.exception.html b/codox/cats.monad.exception.html new file mode 100644 index 0000000..ca2748b --- /dev/null +++ b/codox/cats.monad.exception.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. + +The Try type represents a computation that may either result in an exception, +or return a successfully computed value. It's similar to, but semantically +different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. +</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. +</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. +</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. + +Is a high order function that accept a function +as parameter and returns an other that returns +success or failure depending of result of the +first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.html b/codox/cats.monad.html new file mode 100644 index 0000000..3e87e49 --- /dev/null +++ b/codox/cats.monad.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.identity.html b/codox/cats.monad.identity.html new file mode 100644 index 0000000..d49b81e --- /dev/null +++ b/codox/cats.monad.identity.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. +</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. +</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.lazy.html b/codox/cats.monad.lazy.html new file mode 100644 index 0000000..b16e01b --- /dev/null +++ b/codox/cats.monad.lazy.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. +</pre></div><div class="public anchor" id="var-lazy-monad"><h3>lazy-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lazy-transformer"><h3>lazy-transformer</h3><div class="usage"><code>(lazy-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.maybe.html b/codox/cats.monad.maybe.html new file mode 100644 index 0000000..a2cdfe7 --- /dev/null +++ b/codox/cats.monad.maybe.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. +</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. + +Examples: + (from-maybe (just 1)) + ;=> 1 + (from-maybe (nothing)) + ;=> nil +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.reader.html b/codox/cats.monad.reader.html new file mode 100644 index 0000000..a03d233 --- /dev/null +++ b/codox/cats.monad.reader.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. +</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function +to Reader class instance. +Reader class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the +wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.state.html b/codox/cats.monad.state.html new file mode 100644 index 0000000..56709bc --- /dev/null +++ b/codox/cats.monad.state.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. +</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +value, ignoring the state. +Equivalent to taking the first value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +state. +Equivalent to taking the second value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns +the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces +the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and returns a cats.data.Pair +instance with result and new state. + + (def computation (mlet [x (get-state) + y (put-state (inc x))] + (return y))) + + (def initial-state 1) + (run-state computation initial-state) + +This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function +to State class instance. +State class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the +specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.writer.html b/codox/cats.monad.writer.html new file mode 100644 index 0000000..0a4193c --- /dev/null +++ b/codox/cats.monad.writer.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. +</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.protocols.html b/codox/cats.protocols.html index 93bfe39..c7a8799 100644 --- a/codox/cats.protocols.html +++ b/codox/cats.protocols.html @@ -1,12 +1,28 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-bind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bind</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. -</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) -inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure ctx v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap fv f)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">Incomplete monad type definition. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Applies the function f to the value(s) inside mv's context. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) +inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts +the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. +</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. +</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. +</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state +and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. +</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. +</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. +</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. +</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, +yield a writer which has the first element of the pair as the value and +the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. </pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero ctx)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. </pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.types.html b/codox/cats.types.html deleted file mode 100644 index 0c566d3..0000000 --- a/codox/cats.types.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.types documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.types.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EEither"><div class="inner"><span>->Either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.types.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.types</h2><div class="doc"><pre class="plaintext">Monadic types definition. -</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Continuation. -</pre></div></div><div class="public anchor" id="var--.3EEither"><h3>->Either</h3><div class="usage"><code>(->Either v type)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Either. -</pre></div></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Just. -</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Nothing. -</pre></div></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.Pair. -</pre></div></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.types.State. -</pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. - -Examples: - (from-maybe (just 1)) - ;=> 1 - (from-maybe (nothing)) - ;=> nil -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left v)</code><code>(left)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right v)</code><code>(right)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function -to State class instance. -State class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -State type.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/index.html b/codox/index.html index 71bff03..d87c7c5 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.1.0 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.1.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.1.0</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*m-context*">*m-context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-call-cc">call-cc</a> </li><li> <a href="cats.core.html#var-eval-state">eval-state</a> </li><li> <a href="cats.core.html#var-exec-state">exec-state</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-state">get-state</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-put-state">put-state</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-run-cont">run-cont</a> </li><li> <a href="cats.core.html#var-run-state">run-state</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-swap-state">swap-state</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-context">with-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.types.html">cats.types</a></h3><div class="doc"><pre class="plaintext">Monadic types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.types.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.types.html#var--.3EEither">->Either</a> </li><li> <a href="cats.types.html#var--.3EJust">->Just</a> </li><li> <a href="cats.types.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.types.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.types.html#var--.3EState">->State</a> </li><li> <a href="cats.types.html#var-continuation">continuation</a> </li><li> <a href="cats.types.html#var-from-either">from-either</a> </li><li> <a href="cats.types.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.types.html#var-just">just</a> </li><li> <a href="cats.types.html#var-just.3F">just?</a> </li><li> <a href="cats.types.html#var-left">left</a> </li><li> <a href="cats.types.html#var-left.3F">left?</a> </li><li> <a href="cats.types.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.types.html#var-nothing">nothing</a> </li><li> <a href="cats.types.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.types.html#var-pair">pair</a> </li><li> <a href="cats.types.html#var-pair.3F">pair?</a> </li><li> <a href="cats.types.html#var-right">right</a> </li><li> <a href="cats.types.html#var-right.3F">right?</a> </li><li> <a href="cats.types.html#var-state-t">state-t</a> </li><li> <a href="cats.types.html#var-state.3F">state?</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index f882ff4..d73c9bf 100644 --- a/index.html +++ b/index.html @@ -1,624 +1,1526 @@ <!DOCTYPE html> <html lang="en"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> -<meta name="generator" content="AsciiDoc 8.6.9"> -<title>Category Theory abstractions for Clojure</title> -<link rel="stylesheet" href="static/niwi.css" type="text/css"> -<link rel="stylesheet" href="static/pygments.css" type="text/css"> - - -<script type="text/javascript" src="static/asciidoc.js"></script> -<script type="text/javascript" src="static/niwi.js"></script> -<script type="text/javascript"> -/*<![CDATA[*/ -asciidoc.install(2); -/*]]>*/ -</script> +<meta charset="UTF-8"> +<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<meta name="generator" content="Asciidoctor 1.5.1"> +<meta name="author" content="Andrey Antukh & Alejandro Gómez"> +<title>Cats Documentation</title> +<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"> +<style> +/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ +/* Remove the comments around the @import statement below when using this as a custom stylesheet */ +/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400";*/ +article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} +audio,canvas,video{display:inline-block} +audio:not([controls]){display:none;height:0} +[hidden],template{display:none} +script{display:none!important} +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} +body{margin:0} +a{background:transparent} +a:focus{outline:thin dotted} +a:active,a:hover{outline:0} +h1{font-size:2em;margin:.67em 0} +abbr[title]{border-bottom:1px dotted} +b,strong{font-weight:bold} +dfn{font-style:italic} +hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} +mark{background:#ff0;color:#000} +code,kbd,pre,samp{font-family:monospace;font-size:1em} +pre{white-space:pre-wrap} +q{quotes:"\201C" "\201D" "\2018" "\2019"} +small{font-size:80%} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sup{top:-.5em} +sub{bottom:-.25em} +img{border:0} +svg:not(:root){overflow:hidden} +figure{margin:0} +fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} +legend{border:0;padding:0} +button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} +button,input{line-height:normal} +button,select{text-transform:none} +button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} +button[disabled],html input[disabled]{cursor:default} +input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} +input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} +input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} +textarea{overflow:auto;vertical-align:top} +table{border-collapse:collapse;border-spacing:0} +*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} +html,body{font-size:100%} +body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} +a:hover{cursor:pointer} +img,object,embed{max-width:100%;height:auto} +object,embed{height:100%} +img{-ms-interpolation-mode:bicubic} +#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} +.left{float:left!important} +.right{float:right!important} +.text-left{text-align:left!important} +.text-right{text-align:right!important} +.text-center{text-align:center!important} +.text-justify{text-align:justify!important} +.hide{display:none} +.antialiased,body{-webkit-font-smoothing:antialiased} +img{display:inline-block;vertical-align:middle} +textarea{height:auto;min-height:50px} +select{width:100%} +p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} +.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} +div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} +a{color:#2156a5;text-decoration:underline;line-height:inherit} +a:hover,a:focus{color:#1d4b8f} +a img{border:none} +p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} +p aside{font-size:.875em;line-height:1.35;font-style:italic} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} +h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} +h1{font-size:2.125em} +h2{font-size:1.6875em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} +h4,h5{font-size:1.125em} +h6{font-size:1em} +hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} +em,i{font-style:italic;line-height:inherit} +strong,b{font-weight:bold;line-height:inherit} +small{font-size:60%;line-height:inherit} +code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} +ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} +ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} +ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} +ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} +ul.square{list-style-type:square} +ul.circle{list-style-type:circle} +ul.disc{list-style-type:disc} +ul.no-bullet{list-style:none} +ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} +dl dt{margin-bottom:.3125em;font-weight:bold} +dl dd{margin-bottom:1.25em} +abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} +abbr{text-transform:none} +blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} +blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} +blockquote cite:before{content:"\2014 \0020"} +blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} +blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} +@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} +h1{font-size:2.75em} +h2{font-size:2.3125em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} +h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} +table thead,table tfoot{background:#f7f8f7;font-weight:bold} +table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} +table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} +table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} +table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} +h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} +.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} +.clearfix:after,.float-group:after{clear:both} +*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} +pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} +.keyseq{color:rgba(51,51,51,.8)} +kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} +.keyseq kbd:first-child{margin-left:0} +.keyseq kbd:last-child{margin-right:0} +.menuseq,.menu{color:rgba(0,0,0,.8)} +b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} +b.button:before{content:"[";padding:0 3px 0 2px} +b.button:after{content:"]";padding:0 2px 0 3px} +p a>code:hover{color:rgba(0,0,0,.9)} +#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} +#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} +#header:after,#content:after,#footnotes:after,#footer:after{clear:both} +#content{margin-top:1.25em} +#content:before{content:none} +#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} +#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} +#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} +#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} +#header .details span:first-child{margin-left:-.125em} +#header .details span.email a{color:rgba(0,0,0,.85)} +#header .details br{display:none} +#header .details br+span:before{content:"\00a0\2013\00a0"} +#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} +#header .details br+span#revremark:before{content:"\00a0|\00a0"} +#header #revnumber{text-transform:capitalize} +#header #revnumber:after{content:"\00a0"} +#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} +#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} +#toc>ul{margin-left:.125em} +#toc ul.sectlevel0>li>a{font-style:italic} +#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} +#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} +#toc a{text-decoration:none} +#toc a:active{text-decoration:underline} +#toctitle{color:#7a2518;font-size:1.2em} +@media only screen and (min-width:768px){#toctitle{font-size:1.375em} +body.toc2{padding-left:15em;padding-right:0} +#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} +#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} +#toc.toc2>ul{font-size:.9em;margin-bottom:0} +#toc.toc2 ul ul{margin-left:0;padding-left:1em} +#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} +body.toc2.toc-right{padding-left:0;padding-right:15em} +body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} +#toc.toc2{width:20em} +#toc.toc2 #toctitle{font-size:1.375em} +#toc.toc2>ul{font-size:.95em} +#toc.toc2 ul ul{padding-left:1.25em} +body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +#content #toc>:first-child{margin-top:0} +#content #toc>:last-child{margin-bottom:0} +#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} +#footer-text{color:rgba(255,255,255,.8);line-height:1.44} +.sect1{padding-bottom:.625em} +@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} +#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} +#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} +#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} +#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} +#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} +.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} +.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} +table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} +.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} +table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} +.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} +.admonitionblock>table td.icon{text-align:center;width:80px} +.admonitionblock>table td.icon img{max-width:none} +.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} +.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} +.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} +.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} +.exampleblock>.content>:first-child{margin-top:0} +.exampleblock>.content>:last-child{margin-bottom:0} +.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +.sidebarblock>:first-child{margin-top:0} +.sidebarblock>:last-child{margin-bottom:0} +.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} +.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} +.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} +.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} +.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} +.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} +@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} +.listingblock pre.highlightjs{padding:0} +.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} +.listingblock pre.prettyprint{border-width:0} +.listingblock>.content{position:relative} +.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} +.listingblock:hover code[data-lang]:before{display:block} +.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} +.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} +table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} +table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} +table.pyhltable td.code{padding-left:.75em;padding-right:0} +pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} +pre.pygments .lineno{display:inline-block;margin-right:.25em} +table.pyhltable .linenodiv{background:none!important;padding-right:0!important} +.quoteblock{margin:0 1em 1.25em 1.5em;display:table} +.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} +.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} +.quoteblock blockquote{margin:0;padding:0;border:0} +.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} +.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} +.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} +.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} +.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} +.quoteblock .quoteblock blockquote:before{display:none} +.verseblock{margin:0 1em 1.25em 1em} +.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} +.verseblock pre strong{font-weight:400} +.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} +.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} +.quoteblock .attribution br,.verseblock .attribution br{display:none} +.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} +.quoteblock.abstract{margin:0 0 1.25em 0;display:block} +.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} +.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} +table.tableblock{max-width:100%;border-collapse:separate} +table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} +table.spread{width:100%} +table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} +table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} +table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} +table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} +table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} +table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} +table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} +table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} +table.frame-all{border-width:1px} +table.frame-sides{border-width:0 1px} +table.frame-topbot{border-width:1px 0} +th.halign-left,td.halign-left{text-align:left} +th.halign-right,td.halign-right{text-align:right} +th.halign-center,td.halign-center{text-align:center} +th.valign-top,td.valign-top{vertical-align:top} +th.valign-bottom,td.valign-bottom{vertical-align:bottom} +th.valign-middle,td.valign-middle{vertical-align:middle} +table thead th,table tfoot th{font-weight:bold} +tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} +tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} +p.tableblock>code:only-child{background:none;padding:0} +p.tableblock{font-size:1em} +td>div.verse{white-space:pre} +ol{margin-left:1.75em} +ul li ol{margin-left:1.5em} +dl dd{margin-left:1.125em} +dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} +ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} +ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} +ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} +ul.checklist li>p:first-child>.fa-check-square-o:first-child,ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em} +ul.checklist li>p:first-child>input[type="checkbox"]:first-child{position:relative;top:1px} +ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} +ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} +ul.inline>li>*{display:block} +.unstyled dl dt{font-weight:400;font-style:normal} +ol.arabic{list-style-type:decimal} +ol.decimal{list-style-type:decimal-leading-zero} +ol.loweralpha{list-style-type:lower-alpha} +ol.upperalpha{list-style-type:upper-alpha} +ol.lowerroman{list-style-type:lower-roman} +ol.upperroman{list-style-type:upper-roman} +ol.lowergreek{list-style-type:lower-greek} +.hdlist>table,.colist>table{border:0;background:none} +.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} +td.hdlist1{padding-right:.75em;font-weight:bold} +td.hdlist1,td.hdlist2{vertical-align:top} +.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} +.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} +.colist>table tr>td:last-of-type{padding:.25em 0} +.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} +.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} +.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} +.imageblock>.title{margin-bottom:0} +.imageblock.thumb,.imageblock.th{border-width:6px} +.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} +.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} +.image.left{margin-right:.625em} +.image.right{margin-left:.625em} +a.image{text-decoration:none} +span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} +span.footnote a,span.footnoteref a{text-decoration:none} +span.footnote a:active,span.footnoteref a:active{text-decoration:underline} +#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} +#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} +#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} +#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} +#footnotes .footnote:last-of-type{margin-bottom:0} +#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} +.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} +.gist .file-data>table td.line-data{width:99%} +div.unbreakable{page-break-inside:avoid} +.big{font-size:larger} +.small{font-size:smaller} +.underline{text-decoration:underline} +.overline{text-decoration:overline} +.line-through{text-decoration:line-through} +.aqua{color:#00bfbf} +.aqua-background{background-color:#00fafa} +.black{color:#000} +.black-background{background-color:#000} +.blue{color:#0000bf} +.blue-background{background-color:#0000fa} +.fuchsia{color:#bf00bf} +.fuchsia-background{background-color:#fa00fa} +.gray{color:#606060} +.gray-background{background-color:#7d7d7d} +.green{color:#006000} +.green-background{background-color:#007d00} +.lime{color:#00bf00} +.lime-background{background-color:#00fa00} +.maroon{color:#600000} +.maroon-background{background-color:#7d0000} +.navy{color:#000060} +.navy-background{background-color:#00007d} +.olive{color:#606000} +.olive-background{background-color:#7d7d00} +.purple{color:#600060} +.purple-background{background-color:#7d007d} +.red{color:#bf0000} +.red-background{background-color:#fa0000} +.silver{color:#909090} +.silver-background{background-color:#bcbcbc} +.teal{color:#006060} +.teal-background{background-color:#007d7d} +.white{color:#bfbfbf} +.white-background{background-color:#fafafa} +.yellow{color:#bfbf00} +.yellow-background{background-color:#fafa00} +span.icon>.fa{cursor:default} +.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} +.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} +.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} +.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} +.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} +.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} +.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} +.conum[data-value] *{color:#fff!important} +.conum[data-value]+b{display:none} +.conum[data-value]:after{content:attr(data-value)} +pre .conum[data-value]{position:relative;top:-.125em} +b.conum *{color:inherit!important} +.conum:not([data-value]):empty{display:none} +h1,h2{letter-spacing:-.01em} +dt,th.tableblock,td.content{text-rendering:optimizeLegibility} +p,td.content{letter-spacing:-.01em} +p strong,td.content strong{letter-spacing:-.005em} +p,blockquote,dt,td.content{font-size:1.0625rem} +p{margin-bottom:1.25rem} +.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} +.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} +.print-only{display:none!important} +@media print{@page{margin:1.25cm .75cm} +*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} +a{color:inherit!important;text-decoration:underline!important} +a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} +a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} +abbr[title]:after{content:" (" attr(title) ")"} +pre,blockquote,tr,img{page-break-inside:avoid} +thead{display:table-header-group} +img{max-width:100%!important} +p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} +h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} +#toc,.sidebarblock,.exampleblock>.content{background:none!important} +#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} +.sect1{padding-bottom:0!important} +.sect1+.sect1{border:0!important} +#header>h1:first-child{margin-top:1.25rem} +body.book #header{text-align:center} +body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} +body.book #header .details{border:0!important;display:block;padding:0!important} +body.book #header .details span:first-child{margin-left:0!important} +body.book #header .details br{display:block} +body.book #header .details br+span:before{content:none!important} +body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} +body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} +.listingblock code[data-lang]:before{display:block} +#footer{background:none!important;padding:0 .9375em} +#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} +.hide-on-print{display:none!important} +.print-only{display:block!important} +.hide-for-print{display:none!important} +.show-for-print{display:inherit!important}} +</style> +<style> +.listingblock .pygments .hll { background-color: #ffffcc } +.listingblock .pygments { background: #f0f0f0; } +.listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ +.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ +.listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ +.listingblock .pygments .tok-o { color: #666666 } /* Operator */ +.listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ +.listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ +.listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ +.listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ +.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ +.listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ +.listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ +.listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ +.listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ +.listingblock .pygments .tok-gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ +.listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ +.listingblock .pygments .tok-kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.listingblock .pygments .tok-kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.listingblock .pygments .tok-kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.listingblock .pygments .tok-kp { color: #007020 } /* Keyword.Pseudo */ +.listingblock .pygments .tok-kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.listingblock .pygments .tok-kt { color: #902000 } /* Keyword.Type */ +.listingblock .pygments .tok-m { color: #40a070 } /* Literal.Number */ +.listingblock .pygments .tok-s { color: #4070a0 } /* Literal.String */ +.listingblock .pygments .tok-na { color: #4070a0 } /* Name.Attribute */ +.listingblock .pygments .tok-nb { color: #007020 } /* Name.Builtin */ +.listingblock .pygments .tok-nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.listingblock .pygments .tok-no { color: #60add5 } /* Name.Constant */ +.listingblock .pygments .tok-nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.listingblock .pygments .tok-ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.listingblock .pygments .tok-ne { color: #007020 } /* Name.Exception */ +.listingblock .pygments .tok-nf { color: #06287e } /* Name.Function */ +.listingblock .pygments .tok-nl { color: #002070; font-weight: bold } /* Name.Label */ +.listingblock .pygments .tok-nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.listingblock .pygments .tok-nt { color: #062873; font-weight: bold } /* Name.Tag */ +.listingblock .pygments .tok-nv { color: #bb60d5 } /* Name.Variable */ +.listingblock .pygments .tok-ow { color: #007020; font-weight: bold } /* Operator.Word */ +.listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ +.listingblock .pygments .tok-mb { color: #40a070 } /* Literal.Number.Bin */ +.listingblock .pygments .tok-mf { color: #40a070 } /* Literal.Number.Float */ +.listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ +.listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ +.listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ +.listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ +.listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ +.listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ +.listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.listingblock .pygments .tok-sh { color: #4070a0 } /* Literal.String.Heredoc */ +.listingblock .pygments .tok-si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.listingblock .pygments .tok-sx { color: #c65d09 } /* Literal.String.Other */ +.listingblock .pygments .tok-sr { color: #235388 } /* Literal.String.Regex */ +.listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ +.listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ +.listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ +.listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ +.listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ +.listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ +.listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ +</style> </head> -<body class="article" style="max-width:960px"> +<body class="article toc2 toc-left"> <div id="header"> -<h1>Category Theory abstractions for Clojure</h1> -<span id="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revnumber">version 0.1.0,</span> -<span id="revdate">2014-07-08</span> -<div id="toc"> - <div id="toctitle">Table of Contents</div> - <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript> +<h1>Cats Documentation</h1> +<div class="details"> +<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> +<span id="revdate">0.2.0</span> +</div> +<div id="toc" class="toc2"> +<div id="toctitle">Table of Contents</div> +<ul class="sectlevel1"> +<li><a href="#_introduction">1. Introduction</a> +<ul class="sectlevel2"> +<li><a href="#_why_another_library">1.1. Why another library?</a></li> +</ul> +</li> +<li><a href="#_project_maturity">2. Project Maturity</a></li> +<li><a href="#_install">3. Install</a> +<ul class="sectlevel2"> +<li><a href="#_leiningen">3.1. Leiningen</a></li> +<li><a href="#_maven">3.2. Maven</a></li> +<li><a href="#_get_the_code">3.3. Get the Code</a></li> +</ul> +</li> +<li><a href="#_user_guide">4. User Guide</a> +<ul class="sectlevel2"> +<li><a href="#_functor">4.1. Functor</a></li> +<li><a href="#_applicative">4.2. Applicative</a></li> +<li><a href="#_monad">4.3. Monad</a></li> +<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> +</ul> +</li> +<li><a href="#_monad_types">5. Monad types</a> +<ul class="sectlevel2"> +<li><a href="#_maybe">5.1. Maybe</a></li> +<li><a href="#_either">5.2. Either</a></li> +<li><a href="#_try">5.3. Try</a></li> +<li><a href="#_state">5.4. State</a></li> +<li><a href="#_reader">5.5. Reader</a></li> +<li><a href="#_writer">5.6. Writer</a></li> +<li><a href="#_continuation">5.7. Continuation</a></li> +<li><a href="#_lazy">5.8. Lazy</a></li> +<li><a href="#_vector">5.9. Vector</a></li> +</ul> +</li> +<li><a href="#_faq">6. FAQ</a> +<ul class="sectlevel2"> +<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</a></li> +</ul> +</li> +<li><a href="#_how_to_contribute">7. How to Contribute?</a> +<ul class="sectlevel2"> +<li><a href="#_philosophy">7.1. Philosophy</a></li> +<li><a href="#_procedure">7.2. Procedure</a></li> +<li><a href="#_license">7.3. License</a></li> +</ul> +</li> +</ul> </div> </div> <div id="content"> <div id="preamble"> <div class="sectionbody"> -<div class="paragraph"><p><span class="image"> -<img src="static/logo/logo.png" alt="cats logo"> -</span></p></div> +<div class="paragraph"> +<p><span class="image"><img src="logo.png" alt="cats logo"></span></p> +</div> </div> </div> <div class="sect1"> -<h2 id="_introduction">Introduction</h2> +<h2 id="_introduction">1. Introduction</h2> <div class="sectionbody"> -<div class="paragraph"><p>Category Theory abstractions for Clojure.</p></div> -<div class="sect2"> -<h3 id="_philosophy">Philosophy</h3> -<div class="paragraph"><p>Four most important rules:</p></div> -<div class="ulist"><ul> -<li> -<p> -Beautiful is better than ugly -</p> -</li> -<li> -<p> -Explicit is better than implicit -</p> -</li> -<li> -<p> -Simple is better than complex -</p> -</li> -<li> -<p> -Readability counts -</p> -</li> -</ul></div> +<div class="paragraph"> +<p>Category Theory abstractions for Clojure.</p> </div> <div class="sect2"> -<h3 id="_why_another_library">Why another library?</h3> -<div class="paragraph"><p>Because cats library:</p></div> -<div class="ulist"><ul> -<li> -<p> -targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong> -</p> -</li> -<li> -<p> -aims to have the most simple implementation for supported abstractions. -</p> -</li> -<li> -<p> -aims to have more abstractions that are simple monads. -</p> -</li> +<h3 id="_why_another_library">1.1. Why another library?</h3> +<div class="paragraph"> +<p>Because cats library:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -has documentation as first class citizen. -</p> +<p>targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> </li> <li> -<p> -licensed under a permissive license (compared to other libraries): BSD (2-Clause) -</p> +<p>aims to have the most simple implementation for supported abstractions.</p> </li> -</ul></div> -<div class="paragraph"><p>This is an incomplete list of differences with other existing libraries:</p></div> -<div class="ulist"><ul> <li> -<p> -The official monads library <span class="monospaced">algo.monads</span> is very good, but its approach for modeling - is slighty limited (e.g. you always need to specify what monad you want use instead of - relying on the type). And obviously because it only has monads. -</p> +<p>aims to have more abstractions that are simple monads.</p> </li> <li> -<p> -Fluokitten is the best library that we found, but the future of it is uncertain. One big - difference with fluokitten is that <span class="monospaced">cats</span> doesn’t aim to extend every clojure type - with monadic protocols, for the obvious reason that monad; functor and applicative represents - context/wrapper types and it doesn’t make sense to implement Functor protocol for <span class="monospaced">java.lang.String</span>. -</p> +<p>has documentation as first class citizen.</p> </li> <li> -<p> -<span class="monospaced">bwo/monads</span> is the last monads library. It is completely undocumented and its implementation - has much unnecesary complexity. -</p> +<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> </li> -</ul></div> +</ul> </div> -<div class="sect2"> -<h3 id="_project_maturity">Project Maturity</h3> -<div class="paragraph"><p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> -breakage.</p></div> </div> </div> </div> <div class="sect1"> -<h2 id="_install">Install</h2> +<h2 id="_project_maturity">2. Project Maturity</h2> <div class="sectionbody"> -<div class="paragraph"><p>This section covers installing <em>cats</em>.</p></div> -<div class="sect2"> -<h3 id="_requirements">Requirements</h3> -<div class="paragraph"><p><em>cats</em> supports:</p></div> -<div class="ulist"><ul> -<li> -<p> -JDK7 -</p> -</li> -<li> -<p> -JDK8 -</p> -</li> -</ul></div> +<div class="paragraph"> +<p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> breakage.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_install">3. Install</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section covers installing <em>cats</em>.</p> </div> <div class="sect2"> -<h3 id="_leiningen">Leiningen</h3> -<div class="paragraph"><p>The simplest way to use <em>cats</em> in a Clojure project is by including -it as a dependency in your <strong><em>project.clj</em></strong>:</p></div> +<h3 id="_leiningen">3.1. Leiningen</h3> +<div class="paragraph"> +<p>The simplest way to use <em>cats</em> in a Clojure project is by including +it as a dependency in your <strong><em>project.clj</em></strong>:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">[</span><span class="nv">cats</span> <span class="s">"0.1.0"</span><span class="p">]</span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.2.0"</span><span class="tok-p">]</span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_maven">Maven</h3> -<div class="paragraph"><p>Also, you can use it with maven. First, add the clojars repository:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="nt"><repository></span> - <span class="nt"><id></span>clojars.org<span class="nt"></id></span> - <span class="nt"><url></span>http://clojars.org/repo<span class="nt"></url></span> -<span class="nt"></repository></span> -</pre></div></div></div> -<div class="paragraph"><p>Then for cats:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="nt"><dependency></span> - <span class="nt"><groupId></span>cats<span class="nt"></groupId></span> - <span class="nt"><artifactId></span>cats<span class="nt"></artifactId></span> - <span class="nt"><version></span>0.1.0<span class="nt"></version></span> -<span class="nt"></dependency></span> -</pre></div></div></div> +<h3 id="_maven">3.2. Maven</h3> +<div class="paragraph"> +<p>Also, you can use it with maven. First, add the clojars repository:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> + <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> + <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> +<span class="tok-nt"></repository></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Then for cats:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> + <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> + <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> + <span class="tok-nt"><version></span>0.2.0<span class="tok-nt"></version></span> +<span class="tok-nt"></dependency></span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_get_the_code">Get the Code</h3> -<div class="paragraph"><p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p></div> -<div class="paragraph"><p>You can clone the public repository with this command:</p></div> +<h3 id="_get_the_code">3.3. Get the Code</h3> +<div class="paragraph"> +<p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p> +</div> +<div class="paragraph"> +<p>You can clone the public repository with this command:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre>git clone https://github.com/niwibe/cats -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/niwibe/cats</code></pre> +</div> +</div> </div> </div> </div> <div class="sect1"> -<h2 id="_protocols_reference">Protocols reference</h2> +<h2 id="_user_guide">4. User Guide</h2> <div class="sectionbody"> -<div class="paragraph"><p><strong>In this section, we are using <em>Maybe</em> type for all examples. You can read more about -it in the next section.</strong></p></div> +<div class="paragraph"> +<p>This section introduces almost all category theory abstractios that cats library +supports.</p> +</div> +<div class="paragraph"> +<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all +abstractions and it very easy to understand. You can read more about it in the next +section of this documentation.</p> +</div> <div class="sect2"> -<h3 id="_functor">Functor</h3> -<div class="paragraph"><p>The Functor represents some sort of "computational context".</p></div> -<div class="listingblock"> -<div class="title">Functor protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Functor</span> - <span class="p">(</span><span class="nf">fmap</span> <span class="p">[</span><span class="nv">fv</span> <span class="nv">f</span><span class="p">]</span> - <span class="s">"Applies function f to the value(s) inside</span> -<span class="s"> the context of the functor fv."</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p><span class="monospaced">fmap</span> takes one wrapped value in functor context fv (ex: <span class="monospaced">Just 2</span>) and a plain function, -unwraps the value and applies a function to the plain value returning it wrapped in a new context -of <strong>the same type</strong> as the first argument.</p></div> -<div class="paragraph"><p>Some examples can explain it better:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> -<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<h3 id="_functor">4.1. Functor</h3> +<div class="paragraph"> +<p>Let start with functor. The Functor represents some sort of "computational context", and the +abstraction consists in one unique function: <strong>fmap</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Signature of <strong>fmap</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The high order function <strong>fmap</strong> takes a plain function as first parameter and +value wrapped in functor context as second parameter. It extracts the inner value +apply the function to it, and return the result wrapped in same type as the second +parameter.</p> +</div> +<div class="paragraph"> +<p>But, what is the <strong>*functor context</strong>? It sonds more complex that it is. Functor +wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocol.</p> +</div> +<div class="listingblock"> +<div class="title">One good example of functor is the <strong>Maybe</strong> type:</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-c1">;; `just` function is one of two constructors of Maybe</span> -<span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> -<span class="c1">;; => #<Just [2]></span> -</pre></div></div></div> -<div class="paragraph"><p>Same example but applying function over <strong>Nothing</strong>:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> +<span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Let see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmap over <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It that represents the aucense of value. +Is the safe substitute of <code>nil</code> and may represent the failure.</p> +</div> +<div class="paragraph"> +<p>Let see that is happens if we make same operation of previous example over <strong>nothing</strong> instance:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmap over <strong>nothing</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Oh, awesome, instead of raising null pointer exception, it just return <strong>nothing</strong>. An other good +advantage of use functor abstraction, is that it always return result +in the same type of second argument.</p> +</div> +<div class="paragraph"> +<p>Let see one example of apply fmap over clojure vector:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmav over <strong>vector</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 3 4]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The main difference compared to the previous example with default clojure map, is that the clojure +map works with seqs and doesn’t respect the input container:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => (2 3 4)</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>But why fmap works with vectors? Because some "container" types of clojure like vectors, +lists or sets also implements the functor abstraction.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_applicative">4.2. Applicative</h3> +<div class="paragraph"> +<p>Let continue with applicative function. The Applicative Functor represents +some sort of "computational context" like plain Functor, but with abilty of +execute a function wrapped in same context.</p> +</div> +<div class="paragraph"> +<p>Applicative Functor abstraction consists in two functions: <strong>fapply</strong> and +<strong>pure</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Signature of <strong>fapply</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> <td class="content"> -<div class="paragraph"><p>The real fmap signature is <span class="monospaced">(a -> b) -> f a -> f b</span> that can be translated to clojure <span class="monospaced">[f fv]</span>.</p></div> -<div class="paragraph"><p>The changed order of the protocol parameters definition is required because of clojure’s protocols -limitation that only allow dispatching on the first argument.</p></div> -<div class="paragraph"><p>You should never use a protocol function directly. Instead use <span class="monospaced">cats.core/fmap</span>. It has -the correct signature.</p></div> -<div class="paragraph"><p>All examples in this documentation uses <span class="monospaced">cats.core/fmap</span> instead of a function defined in the -protocol.</p></div> +<strong>pure</strong> function it will be explained later. </td> -</tr></table> +</tr> +</table> +</div> +<div class="paragraph"> +<p>The use case of Applicative Functors is much same as of plain Functors: safe +evaluation of some computation in a context.</p> +</div> +<div class="paragraph"> +<p>Let see one exaple for understand better the differences between functor and +applicative functor:</p> +</div> +<div class="paragraph"> +<p>Imagine, you have some factory function that depending of language, return a +greater function and you only has support for few languages.</p> </div> -<div class="paragraph"><p>Some of the native clojure types, like Vector, also implements the Functor protocol and can -work like a functor context/container:</p></div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">fmap</span> <span class="nb">inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;; => [2 3 4]</span> -</pre></div></div></div> -<div class="paragraph"><p>The main difference compared to the previous example with default clojure map, is that the clojure -map works with seqs and doesn’t respect the input container:</p></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-nv">nil</span><span class="tok-p">))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, if you want to use it, you should always defensively check if returned +greater is a valid function or is a nil value.</p> +</div> +<div class="paragraph"> +<p>Lets go to convert this factory to use Maybe type:</p> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nb">map inc </span><span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;; => (2 3 4)</span> -</pre></div></div></div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)))</span></code></pre> </div> -<div class="sect2"> -<h3 id="_applicative_functor">Applicative Functor</h3> -<div class="paragraph"><p>Represents an abstraction lying in between Functor and Monad in expressivity.</p></div> -<div class="listingblock"> -<div class="title">Applicative protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Applicative</span> - <span class="p">(</span><span class="nf">fapply</span> <span class="p">[</span><span class="nv">af</span> <span class="nv">av</span><span class="p">]</span> - <span class="s">"Applies the function(s) inside ag's context to the value(s)</span> -<span class="s"> inside av's context while preserving the context."</span><span class="p">)</span> - <span class="p">(</span><span class="nf">pure</span> <span class="p">[</span><span class="nv">ctx</span> <span class="nv">v</span><span class="p">]</span> - <span class="s">"Takes any context monadic value ctx and any value v, and puts</span> -<span class="s"> the value v in the most minimal context of the same type of ctx"</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p>With the same idea of data inside a context (like <span class="monospaced">Functor</span>), what happens if a wrapped value is -one function/computation? Applicative functors works like plain functors but additionally -can apply a function wrapped in some context similar to input value.</p></div> -<div class="paragraph"><p>Let see one example:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defn </span><span class="nv">make-greeter</span> - <span class="p">[</span><span class="o">^</span><span class="nv">String</span> <span class="nv">lang</span><span class="p">]</span> - <span class="p">(</span><span class="nf">condp</span> <span class="nb">= </span><span class="nv">lang</span> - <span class="s">"es"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hola "</span> <span class="nv">name</span><span class="p">)))</span> - <span class="s">"en"</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">name</span><span class="p">]</span> <span class="p">(</span><span class="nb">str </span><span class="s">"Hello "</span> <span class="nv">name</span><span class="p">)))</span> - <span class="p">(</span><span class="nf">nothing</span><span class="p">)))</span> +</div> +<div class="paragraph"> +<p>As you can observe, this version of factory differs little bit from the +original implementation. And this little change makes you superpower: you +can apply the returned greater to any value without defensive nil checking:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hola Alex]></span> -<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"es"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> -<span class="c1">;; => #<Just [Hola Alex]></span> +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hello Alex]></span> -<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"en"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> -<span class="c1">;; => #<Just [Hello Alex]></span> +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Moreover the applicative functor comes with <strong>pure</strong> function, and main purpose of this function is +put some value in side effect free contex of the current type.</p> +</div> +<div class="paragraph"> +<p>Examples:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> -<span class="p">(</span><span class="nf">fapply</span> <span class="p">(</span><span class="nf">make-greeter</span> <span class="s">"it"</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="s">"Alex"</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> -<div class="paragraph"><p>Moreover, the applicative functor protocol comes with another function: <span class="monospaced">pure</span>. The main purpose of -this function is, given any value in a context and new value, wrap the new value in a minimal context of the same -type as the first argument.</p></div> -<div class="paragraph"><p>Examples:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="mi">5</span><span class="p">)</span> -<span class="c1">;; => #<Just [5]></span> +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [5]></span> -<span class="p">(</span><span class="nf">pure</span> <span class="p">(</span><span class="nb">right </span><span class="ss">:foo</span><span class="p">)</span> <span class="ss">:bar</span><span class="p">)</span> -<span class="c1">;; => #<Either [:bar :right]></span> -</pre></div></div></div> -<div class="paragraph"><p>You will understand the real purpose of this function when using a <strong>Monad</strong> abstraction.</p></div> +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>If you not understand the purpose of <strong>pure</strong> function, it is possible that the next section +can clarify the real purpose of it.</p> +</div> </div> <div class="sect2"> -<h3 id="_monad">Monad</h3> -<div class="paragraph"><p>Monads are the most discussed programming concept to come from category theory. Like functors and -applicatives, monads deal with data in contexts.</p></div> -<div class="paragraph"><p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and -put new values in a completely different context.</p></div> -<div class="listingblock"> -<div class="title">Monad protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">Monad</span> - <span class="s">"Incomplete monad type definition."</span> - <span class="p">(</span><span class="nf">bind</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">f</span><span class="p">]</span> <span class="s">"Applies the function f to the value(s) inside mv's context."</span><span class="p">))</span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> +<h3 id="_monad">4.3. Monad</h3> +<div class="paragraph"> +<p>Monads are the most discussed programming concept to come from category theory. Like functors and +applicatives, monads deal with data in contexts.</p> +</div> +<div class="paragraph"> +<p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and +put new values in a completely different context.</p> +</div> +<div class="paragraph"> +<p>The monad abstraction consists on two functions: <strong>bind</strong> and <strong>return</strong></p> +</div> +<div class="listingblock"> +<div class="title">Bind function signature.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can observe, it works much like Functor but with inverted arguments, the main deference is +that in monad, the function is a responsible of wrapping a retuned value in a context.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of bind high order function.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>One of the key features of the bind function is that any computation executed inside of context of +bind (monad) knows the context type implicitly. Having this, if you apply some computation over some +monadic value and you want to return the result in the same container context but you don’t know +that container is it, you can use <code>return</code> or <code>pure</code> functions:</p> +</div> +<div class="listingblock"> +<div class="title">Usage of return function in bind context.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context +value that’s set internally by the <code>bind</code> function. Therefore you can’t use them with one argument out +of a <code>bind</code> context.</p> +</div> +<div class="paragraph"> +<p>At this time, everything is fine, we not can compose any number of computations using monad <strong>*bind</strong> +functions. But that is happens where the number of computations increases:</p> +</div> +<div class="listingblock"> +<div class="title">Composability example of bind function.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>This easy grows to very beatiful callback hell. For solve this, <em>cats</em> comes with powerful +macro: <strong>mlet</strong></p> +</div> +<div class="listingblock"> +<div class="title">Previous example but using <strong>mlet</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">As opposed to haskell type classes, <em>cats</em> protocols only define one method: <span class="monospaced">bind</span>. Other -related methods like <span class="monospaced">return</span> are defined as auxiliar functions in <span class="monospaced">cats.core</span>.</td> -</tr></table> -</div> -<div class="paragraph"><p><span class="monospaced">bind</span> function, takes a monadic value (any container that implements a <span class="monospaced">Monad</span> protocol) and one -function, applies the function with unwrapped value as first parameter and returns a result. In this -case, the function is responsible for wrapping the result in a corresponding context.</p></div> -<div class="paragraph"><p>One of the key features of the bind function is that everything inside a monad context knows the context -type. Having this, if you apply some computation over a monad and you want to return the result -in the same container context but you don’t know that container is it, you can use <span class="monospaced">return</span> or <span class="monospaced">pure</span>.</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">bind</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> <span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">v</span><span class="p">]</span> <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">inc </span><span class="nv">v</span><span class="p">))))</span> -<span class="c1">;; => #<Just [2]></span> -</pre></div></div></div> -<div class="paragraph"><p>The <span class="monospaced">return</span> or <span class="monospaced">pure</span> functions, when called with one argument, try to use the dynamic scope context value -that’s set internally by the <span class="monospaced">bind</span> function. Therefore you can’t use them with one argument out of a <span class="monospaced">bind</span> context.</p></div> -<div class="paragraph"><p>And finally, to make more powerful monadic compositions, <em>cats</em> comes with the <span class="monospaced">mlet</span> macro that -if you are coming from haskell, represents a <span class="monospaced">do-syntax</span>:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> - <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> - <span class="nv">z</span> <span class="p">(</span><span class="nf">just</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">))]</span> - <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> -<span class="c1">;; => #<Just [3]></span> -</pre></div></div></div> -<div class="paragraph"><p>If you want to use regular (non-monadic) let bindings inside a <span class="monospaced">mlet</span> block, you can do so using -<span class="monospaced">:let</span> and a bindings vector as a pair inside the mlet bindings:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">x</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> - <span class="nv">y</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">2</span><span class="p">)</span> - <span class="ss">:let</span> <span class="p">[</span><span class="nv">z</span> <span class="p">(</span><span class="nb">+ </span><span class="nv">x</span> <span class="nv">y</span><span class="p">)]]</span> - <span class="p">(</span><span class="nf">return</span> <span class="nv">z</span><span class="p">))</span> -<span class="c1">;; => #<Just [3]></span> -</pre></div></div></div> +<td class="content"> +If you are coming from haskell, it represents the <strong>do-syntax</strong>. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>If you want to use regular (non-monadic) let bindings inside a <code>mlet</code> block, you can do so using +<code>:let</code> and a bindings vector as a pair inside the mlet bindings:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))</span> + <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_monadzero">MonadZero</h3> -<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadZero">MonadZero</a> protocol -represents a monad that has a notion of an identity element.</p></div> -<div class="listingblock"> -<div class="title">MonadZero protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadZero</span> - <span class="s">"A `Monad` that supports the notion of an identity element."</span> - <span class="p">(</span><span class="nf">mzero</span> <span class="p">[</span><span class="nv">ctx</span><span class="p">]</span> <span class="s">"The identity element for `ctx`."</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p>The <span class="monospaced">bind</span> operation on the identity element satisfies Left Zero:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> +<h3 id="_monad_transformers">4.4. Monad Transformers</h3> +<div class="sect3"> +<h4 id="_motivation">4.4.1. Motivation</h4> +<div class="paragraph"> +<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, +we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> -<span class="p">(</span><span class="nb">= </span><span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> - <span class="p">(</span><span class="nf">>>=</span> <span class="p">(</span><span class="nf">mzero</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">))</span> <span class="nv">just</span><span class="p">))</span> -<span class="c1">;; => true</span> -</pre></div></div></div> -<div class="paragraph"><p>When a monad instance implements the MonadZero protocol, <span class="monospaced">:when</span> clauses can be used in <span class="monospaced">mlet</span> -bindings:</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span> <span class="mi">4</span> <span class="mi">5</span><span class="p">]</span> - <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> - <span class="p">(</span><span class="nf">return</span> <span class="nv">i</span><span class="p">))</span> -<span class="c1">;; => [3 4 5]</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> + <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> -<span class="p">(</span><span class="nf">mlet</span> <span class="p">[</span><span class="nv">i</span> <span class="p">(</span><span class="nf">t/just</span> <span class="mi">2</span><span class="p">)</span> - <span class="ss">:when</span> <span class="p">(</span><span class="nb">> </span><span class="nv">i</span> <span class="mi">2</span><span class="p">)]</span> - <span class="p">(</span><span class="nf">m/return</span> <span class="nv">i</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> +<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> +<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> +<span class="tok-c1">; contain a value of any type.</span> +<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> +<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> </div> -<div class="sect2"> -<h3 id="_monadplus">MonadPlus</h3> -<div class="paragraph"><p>The <a href="http://www.haskell.org/haskellwiki/MonadPlus_reform_proposal#MonadPlus">MonadPlus</a> protocol -represents a MonadZero wich has a plus operation.</p></div> -<div class="listingblock"> -<div class="title">MonadPlus protocol</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="kd">defprotocol </span><span class="nv">MonadPlus</span> - <span class="s">"A `MonadZero` that supports the notion of addition."</span> - <span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="nv">mv</span> <span class="nv">mv</span><span class="o">'</span><span class="p">]</span> <span class="s">"An associative addition operation."</span><span class="p">))</span> -</pre></div></div></div> -<div class="paragraph"><p><span class="monospaced">mplus</span> is an associative binary operation for which the value that <span class="monospaced">mzero</span> gives is the identity -element. The <span class="monospaced">mplus</span> version contained in the core namespace is variadic.</p></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">just</span> <span class="nv">nothing</span><span class="p">]])</span> -<span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.core</span> <span class="ss">:refer</span> <span class="p">[</span><span class="nv">mplus</span><span class="p">]])</span> +</div> +<div class="paragraph"> +<p>However, monads don’t compose as nicely as functors do. We have to actually implement +the composition ourselves.</p> +</div> +<div class="paragraph"> +<p>In some circumstances we would like combine the effects of two monads in another one. We call the +resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A +monad transformer is itself a monad.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> +<div class="paragraph"> +<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer +using State as the base monad, since we want the resulting type to be a stateful computation +that may fail: <code>s -> Maybe (a, s)</code>.</p> +</div> +<div class="paragraph"> +<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with +any other monad. The transformer creating functions take a Monad as their argument and their +return a reified MonadTrans:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> -<span class="p">(</span><span class="nf">mplus</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">]</span> <span class="p">[</span><span class="mi">4</span> <span class="mi">5</span> <span class="mi">6</span><span class="p">]</span> <span class="p">[</span><span class="mi">7</span> <span class="mi">8</span><span class="p">])</span> -<span class="c1">;; => [1 2 3 4 5 6 7 8]</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> -<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">))</span> -<span class="c1">;; => #<Nothing ></span> +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> -<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">))</span> -<span class="c1">;; => #<Just [42]></span> +<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful +function that, when run, yields a Maybe containing a pair (value, next state).</p> +</div> +<div class="paragraph"> +<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. +When working with monad transformers we have to be explicit about what monad are we using to implement +the binding policy since there is no way to distinguish values from a transformer type from those of +a regular monad.</p> +</div> +<div class="paragraph"> +<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> +</div> +<div class="paragraph"> +<p>Let’s see it in action:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> + <span class="tok-s">"A function that takes an input string as an state and</span> +<span class="tok-s"> consumes one character yielding it as a the value. The</span> +<span class="tok-s"> new state is the input string with the character consumed.</span> -<span class="p">(</span><span class="nf">mplus</span> <span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">42</span><span class="p">)</span> <span class="p">(</span><span class="nf">just</span> <span class="mi">3</span><span class="p">))</span> -<span class="c1">;; => #<Just [42]></span> -</pre></div></div></div> +<span class="tok-s"> It fails when there isn't a character to consume."</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Nothing ></span> + +<span class="tok-c1">; We could have written `any-two-chars` more succintly using `cats.core/mlet-with`,</span> +<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> + +<span class="tok-c1">; We also define a function for applying parser to a given input</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +</div> </div> </div> </div> <div class="sect1"> -<h2 id="_data_types_reference">Data Types reference</h2> +<h2 id="_monad_types">5. Monad types</h2> <div class="sectionbody"> -<div class="paragraph"><p>We talked about values in a context, but that is a context? Context per se is any value that -wraps an other value inside.</p></div> +<div class="paragraph"> +<p>Monad as is, is an abstraction, and we have seen two types in examples that implements +the monad abstraction: Maybe and Either. But they are the smallest part of types +that implements the Monad abstraction. In this section we try explain different +monad types supported by <em>cats</em> library.</p> +</div> <div class="sect2"> -<h3 id="_maybe">Maybe</h3> -<div class="paragraph"><p>This is one of the two most used monad types (commonly named Optional in non-functional programming -languages).</p></div> -<div class="paragraph"><p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is +<h3 id="_maybe">5.1. Maybe</h3> +<div class="paragraph"> +<p>This is one of the two most used monad types (commonly named Optional in non-functional programming +languages).</p> +</div> +<div class="paragraph"> +<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is used as the return type of functions which may or may not return a meaningful value when they are applied. It consists of either an empty constructor (called None or Nothing), or a constructor -encapsulating the original data type A (written Just A or Some A).</p></div> -<div class="paragraph"><p><em>cats</em>, implements two constructors:</p></div> -<div class="ulist"><ul> +encapsulating the original data type A (written Just A or Some A).</p> +</div> +<div class="paragraph"> +<p><em>cats</em>, implements two constructors:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -<span class="monospaced">(just v)</span>: represents just a value in a context. -</p> +<p><code>(just v)</code>: represents just a value in a context.</p> </li> <li> -<p> -<span class="monospaced">(nothing)</span>: represents a failure or null. -</p> +<p><code>(nothing)</code>: represents a failure or null.</p> </li> -</ul></div> -<div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> -<span class="p">(</span><span class="nf">just</span> <span class="mi">1</span><span class="p">)</span> -<span class="c1">;; => #<Just [1]></span> -<span class="p">(</span><span class="nf">nothing</span><span class="p">)</span> -<span class="c1">;; => #<Nothing ></span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> +</ul> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [1]></span> +<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">Maybe types are: Functors, Applicative Functors and Monads</td> -</tr></table> +<td class="content"> +Maybe types are: Functors, Applicative Functors and Monads +</td> +</tr> +</table> </div> </div> <div class="sect2"> -<h3 id="_either">Either</h3> -<div class="paragraph"><p>Either is another type that represents a result of computation, but in contrast with maybe -it can return some data with a failed computation result.</p></div> -<div class="paragraph"><p>In <em>cats</em> it has two constructors:</p></div> -<div class="ulist"><ul> +<h3 id="_either">5.2. Either</h3> +<div class="paragraph"> +<p>Either is another type that represents a result of computation, but in contrast with maybe +it can return some data with a failed computation result.</p> +</div> +<div class="paragraph"> +<p>In <em>cats</em> it has two constructors:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -<span class="monospaced">(left v)</span>: represents a failure. -</p> +<p><code>(left v)</code>: represents a failure.</p> </li> <li> -<p> -<span class="monospaced">(right v)</span>: represents a successful result. -</p> +<p><code>(right v)</code>: represents a successful result.</p> </li> -</ul></div> +</ul> +</div> <div class="listingblock"> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">require</span> <span class="o">'</span><span class="p">[</span><span class="nv">cats.types</span> <span class="ss">:refer</span> <span class="ss">:all</span><span class="p">])</span> +<div class="title">Usage example of <strong>Either</strong> constructors.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> -<span class="p">(</span><span class="nb">right </span><span class="ss">:valid-value</span><span class="p">)</span> -<span class="c1">;; => #<Right [:valid-value :right]></span> +<span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Right [:valid-value :right]></span> -<span class="p">(</span><span class="nb">left </span><span class="s">"Error message"</span><span class="p">)</span> -<span class="c1">;; => #<Either [Error message :left]></span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> +<span class="tok-p">(</span><span class="tok-nb">left </span><span class="tok-s">"Error message"</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [Error message :left]></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">Either is also (like Maybe) Functor, Applicative Functor and Monad.</td> -</tr></table> +<td class="content"> +Either is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> </div> </div> +<div class="sect2"> +<h3 id="_try">5.3. Try</h3> +<div class="paragraph"> +<p>Also called Exception.</p> </div> +<div class="paragraph"> +<p>The <code>Try</code> type represents a computation that may either result in an exception, +or return a successfully computed value. It’s similar to, but semantically +different from the <code>Either</code> type.</p> </div> -<div class="sect1"> -<h2 id="_clojure_types">Clojure Types</h2> -<div class="sectionbody"> -<div class="paragraph"><p>Besides the own types, some clojure types has implementations for previously explained -category theory abstractions.</p></div> -<div class="admonitionblock"> -<table><tr> +<div class="paragraph"> +<p>It’s an analogue for the try-catch block: it replaces try-catch’s stack based error +handling with heap based error handling. Instead of having an exception thrown and +having to deal with it immediately in the same thread, it disconnects the error +handling and recovery.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>try-on</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [1]></span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Failure [#<NullPointerException java.lang.NullPointerException>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>For make it more powerfull, <em>cats</em> comes with other sugar syntax macros: <code>try-or-else</code> that +returns a default value if a computation fails and <code>try-or-recover</code> that make the +facility of handle yourself the return value executing a function with the exception as +first parameter.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-else</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [2]></span></code></pre> +</div> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-recover</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">cond</span> + <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> + <span class="tok-ss">:else</span> <span class="tok-mi">100</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Success [0]></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Try is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_state">5.4. State</h3> +<div class="paragraph"> +<p>State monad in one of the special use cases of monads most used in haskell. It has different +purposes including: lazy computation composition and maintaining state without explicit state.</p> +</div> +<div class="paragraph"> +<p>The de facto monadic type of the state monad is a plain function. Function represents a computation +as is (without executing it). Obviously, a function should have some special characteristics to work +in monad state composition.</p> +</div> +<div class="listingblock"> +<div class="title">Valid function for valid state monad</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> + <span class="tok-s">"Takes state as argument and return a vector</span> +<span class="tok-s"> with first argument with procesed value and</span> +<span class="tok-s"> second argument the transformed new state."</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> + <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> + <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Right, you just saw an example of the low level primitive of state monad but for basic usage +you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p> +</div> +<div class="paragraph"> +<p>Let’s look at one example before explaining the details:</p> +</div> +<div class="listingblock"> +<div class="title">Lazy composition of computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> + <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> +<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>At the moment of evaluating the previous expression, anything that we have defined +is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p> +</div> +<div class="paragraph"> +<p>State is a simple wrapper for clojure functions, nothing more.</p> +</div> +<div class="paragraph"> +<p>Now, it time to execute the composed computation, for this we can use one of the following +functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>run-state</code> function executes the composed computation and returns both the value and the +result state.</p> +</li> +<li> +<p><code>eval-state</code> function executes the composed computation and returns the resulting value +discarding the state.</p> +</li> +<li> +<p><code>exec-state</code> function executes the composed computation and return only the resulting +state, ignoring the resulting value.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> +<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> 1</span> +<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> (2 3)</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> <td class="icon"> <div class="title">Note</div> </td> -<td class="content">In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types +<td class="content"> +the pair instance returned by <code>run-state</code> functions works like any other seq of clojure, with +the difference that pairs can only have two slots. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them +seems out of the scope of this document.</p> +</div> +<div class="paragraph"> +<p>However, if you have better examples to explain the state monad, documentation for another monad or +any other contribution is always welcome.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_reader">5.5. Reader</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_writer">5.6. Writer</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_continuation">5.7. Continuation</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_lazy">5.8. Lazy</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_vector">5.9. Vector</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_faq">6. FAQ</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> +<div class="paragraph"> +<p>This is an incomplete list of differences with other existing libraries:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling +is slighty limited (e.g. you always need to specify what monad you want use instead of +relying on the type). And obviously because it only has monads.</p> +</li> +<li> +<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big +difference with fluokitten is that <code>cats</code> doesn’t aim to extend every clojure type +with monadic protocols, for the obvious reason that monad; functor and applicative represents +context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> +</li> +<li> +<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation +has much unnecesary complexity.</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</h3> +<div class="paragraph"> +<p>In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types that don’t act like containers. For example, clojure keywords are values but can not be containers so -they should not extend any of the previously explained protocols.</td> -</tr></table> +they should not extend any of the previously explained protocols.</p> </div> -<table class="tableblock frame-all grid-all" -style=" -width:100%; -"> +<table class="tableblock frame-all grid-all spread"> <caption class="title">Table 1. Summary of clojure types and implemented protocols</caption> -<col style="width:50%;"> -<col style="width:50%;"> +<colgroup> +<col style="width: 50%;"> +<col style="width: 50%;"> +</colgroup> <thead> <tr> -<th class="tableblock halign-left valign-top" > Name </th> -<th class="tableblock halign-left valign-top" > Implemented protocols</th> +<th class="tableblock halign-left valign-top">Name</th> +<th class="tableblock halign-left valign-top">Implemented protocols</th> </tr> </thead> <tbody> <tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">hash-set</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">list</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top" ><p class="tableblock">atom</p></td> -<td class="tableblock halign-left valign-top" ><p class="tableblock">No one (in future)</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> </tbody> </table> </div> </div> +</div> <div class="sect1"> -<h2 id="_special_use_cases_of_monads">Special use cases of monads</h2> +<h2 id="_how_to_contribute">7. How to Contribute?</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_state_monad">State monad</h3> -<div class="paragraph"><p>State monad in one of the special use cases of monads most used in haskell. It has different -purposes including: lazy computation composition and maintaining state without explicit state.</p></div> -<div class="paragraph"><p>The de facto monadic type of the state monad is a plain function. Function represents a computation -as is (without executing it). Obviously, a function should have some special characteristics to work -in monad state composition.</p></div> -<div class="listingblock"> -<div class="title">Valid function for valid state monad</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="k">fn </span><span class="p">[</span><span class="nv">state</span><span class="p">]</span> - <span class="s">"Takes state as argument and return a vector</span> -<span class="s"> with first argument with procesed value and</span> -<span class="s"> second argument the transformed new state."</span> - <span class="p">(</span><span class="k">let </span><span class="p">[</span><span class="nv">newvalue</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)</span> - <span class="nv">newstate</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">)]</span> - <span class="p">[</span><span class="nv">newvalue</span> <span class="nv">newstate</span><span class="p">]))</span> -</pre></div></div></div> -<div class="paragraph"><p>Right, you just saw an example of the low level primitive of state monad but for basic usage -you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p></div> -<div class="paragraph"><p>Let’s look at one example before explaining the details:</p></div> -<div class="listingblock"> -<div class="title">Lazy composition of computations</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/mlet</span> <span class="p">[</span><span class="nv">state</span> <span class="p">(</span><span class="nf">m/get-state</span><span class="p">)</span> - <span class="nv">_</span> <span class="p">(</span><span class="nf">m/put-state</span> <span class="p">(</span><span class="nb">next </span><span class="nv">state</span><span class="p">))]</span> - <span class="p">(</span><span class="nf">return</span> <span class="p">(</span><span class="nb">first </span><span class="nv">state</span><span class="p">)))</span> -<span class="c1">;;=> #<State cats.types.State@2eebabb6></span> -</pre></div></div></div> -<div class="paragraph"><p>At the moment of evaluating the previous expression, anything that we have defined -is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p></div> -<div class="paragraph"><p>State is a simple wrapper for clojure functions, nothing more.</p></div> -<div class="paragraph"><p>Now, it time to execute the composed computation, for this we can use one of the following -functions exposed by <em>cats</em>: <span class="monospaced">run-state</span>, <span class="monospaced">eval-state</span> and <span class="monospaced">exec-state</span>.</p></div> -<div class="ulist"><ul> +<h3 id="_philosophy">7.1. Philosophy</h3> +<div class="paragraph"> +<p>Five most important rules:</p> +</div> +<div class="ulist"> +<ul> <li> -<p> -<span class="monospaced">run-state</span> function executes the composed computation and returns both the value and the - result state. -</p> +<p>Beautiful is better than ugly.</p> </li> <li> -<p> -<span class="monospaced">eval-state</span> function executes the composed computation and returns the resulting value - discarding the state. -</p> +<p>Explicit is better than implicit.</p> </li> <li> -<p> -<span class="monospaced">exec-state</span> function executes the composed computation and return only the resulting - state, ignoring the resulting value. -</p> +<p>Simple is better than complex.</p> </li> -</ul></div> -<div class="listingblock"> -<div class="title">This is what happens when we execute these three functions over previously generated <span class="monospaced">State</span> instance</div> -<div class="content"><div class="highlight"><pre><span class="p">(</span><span class="nf">m/run-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;;=> #<Pair [1 (2 3)]></span> -<span class="p">(</span><span class="nf">m/eval-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;;=> 1</span> -<span class="p">(</span><span class="nf">m/exec-state</span> <span class="nv">s</span> <span class="p">[</span><span class="mi">1</span> <span class="mi">2</span> <span class="mi">3</span><span class="p">])</span> -<span class="c1">;;=> (2 3)</span> -</pre></div></div></div> -<div class="admonitionblock"> -<table><tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content">the pair instance returned by <span class="monospaced">run-state</span> functions works like any other seq of clojure, with -the difference that pairs can only have two slots.</td> -</tr></table> +<li> +<p>Complex is better than complicated.</p> +</li> +<li> +<p>Readability counts.</p> +</li> +</ul> </div> -<div class="paragraph"><p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them -seems out of the scope of this document.</p></div> -<div class="paragraph"><p>However, if you have better examples to explain the state monad, documentation for another monad or -any other contribution is always welcome.</p></div> +<div class="paragraph"> +<p>All contributions to <em>cats</em> should keep these important rules in mind.</p> </div> </div> +<div class="sect2"> +<h3 id="_procedure">7.2. Procedure</h3> +<div class="paragraph"> +<p><em>cats</em> unlike Clojure and other Clojure contrib libs, does not have many +restrictions for contributions. Just follow the following steps depending on the +situation:</p> </div> -<div class="sect1"> -<h2 id="_license">License</h2> -<div class="sectionbody"> +<div class="paragraph"> +<p><strong>Bugfix</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Fork the GitHub repo.</p> +</li> +<li> +<p>Fix a bug/typo on a new branch.</p> +</li> +<li> +<p>Make a pull-request to master.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p><strong>New feature</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Open new issue with the new feature proposal.</p> +</li> +<li> +<p>If it is accepted, follow the same steps as "bugfix".</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_license">7.3. License</h3> <div class="listingblock"> -<div class="content"><div class="highlight"><pre>Copyright (c) 2014, Andrey Antukh +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014, Andrey Antukh Copyright (c) 2014, Alejandro Gómez All rights reserved. @@ -642,17 +1544,17 @@ <h2 id="_license">License</h2> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -</pre></div></div></div> +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</code></pre> +</div> +</div> +</div> </div> </div> </div> -<div id="footnotes"><hr></div> <div id="footer"> <div id="footer-text"> -Version 0.1.0<br> -Last updated 2014-07-10 08:09:19 UTC +Last updated 2014-10-26 13:40:18 CET </div> </div> </body> -</html> +</html> \ No newline at end of file From 28607060b1e96d5e7c7309f749c5b624ed3247ab Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 26 Oct 2014 13:43:23 +0100 Subject: [PATCH 26/52] Remove index dev. --- index-dev.html | 1562 ------------------------------------------------ 1 file changed, 1562 deletions(-) delete mode 100644 index-dev.html diff --git a/index-dev.html b/index-dev.html deleted file mode 100644 index 564cd19..0000000 --- a/index-dev.html +++ /dev/null @@ -1,1562 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<meta charset="UTF-8"> -<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.1"> -<meta name="author" content="Andrey Antukh & Alejandro Gómez"> -<title>Cats Documentation</title> -<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"> -<style> -/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ -/* Remove the comments around the @import statement below when using this as a custom stylesheet */ -/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400";*/ -article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} -audio,canvas,video{display:inline-block} -audio:not([controls]){display:none;height:0} -[hidden],template{display:none} -script{display:none!important} -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} -body{margin:0} -a{background:transparent} -a:focus{outline:thin dotted} -a:active,a:hover{outline:0} -h1{font-size:2em;margin:.67em 0} -abbr[title]{border-bottom:1px dotted} -b,strong{font-weight:bold} -dfn{font-style:italic} -hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} -mark{background:#ff0;color:#000} -code,kbd,pre,samp{font-family:monospace;font-size:1em} -pre{white-space:pre-wrap} -q{quotes:"\201C" "\201D" "\2018" "\2019"} -small{font-size:80%} -sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} -sup{top:-.5em} -sub{bottom:-.25em} -img{border:0} -svg:not(:root){overflow:hidden} -figure{margin:0} -fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} -legend{border:0;padding:0} -button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} -button,input{line-height:normal} -button,select{text-transform:none} -button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} -button[disabled],html input[disabled]{cursor:default} -input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} -input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} -button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} -textarea{overflow:auto;vertical-align:top} -table{border-collapse:collapse;border-spacing:0} -*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} -html,body{font-size:100%} -body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} -a:hover{cursor:pointer} -img,object,embed{max-width:100%;height:auto} -object,embed{height:100%} -img{-ms-interpolation-mode:bicubic} -#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} -.left{float:left!important} -.right{float:right!important} -.text-left{text-align:left!important} -.text-right{text-align:right!important} -.text-center{text-align:center!important} -.text-justify{text-align:justify!important} -.hide{display:none} -.antialiased,body{-webkit-font-smoothing:antialiased} -img{display:inline-block;vertical-align:middle} -textarea{height:auto;min-height:50px} -select{width:100%} -p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} -.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} -div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} -a{color:#2156a5;text-decoration:underline;line-height:inherit} -a:hover,a:focus{color:#1d4b8f} -a img{border:none} -p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} -p aside{font-size:.875em;line-height:1.35;font-style:italic} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} -h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} -h1{font-size:2.125em} -h2{font-size:1.6875em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} -h4,h5{font-size:1.125em} -h6{font-size:1em} -hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} -em,i{font-style:italic;line-height:inherit} -strong,b{font-weight:bold;line-height:inherit} -small{font-size:60%;line-height:inherit} -code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} -ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} -ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} -ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} -ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} -ul.square{list-style-type:square} -ul.circle{list-style-type:circle} -ul.disc{list-style-type:disc} -ul.no-bullet{list-style:none} -ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} -dl dt{margin-bottom:.3125em;font-weight:bold} -dl dd{margin-bottom:1.25em} -abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} -abbr{text-transform:none} -blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} -blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} -blockquote cite:before{content:"\2014 \0020"} -blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} -blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} -@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} -h1{font-size:2.75em} -h2{font-size:2.3125em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} -h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} -table thead,table tfoot{background:#f7f8f7;font-weight:bold} -table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} -table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} -table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} -table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} -h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} -.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} -.clearfix:after,.float-group:after{clear:both} -*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} -pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} -.keyseq{color:rgba(51,51,51,.8)} -kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} -.keyseq kbd:first-child{margin-left:0} -.keyseq kbd:last-child{margin-right:0} -.menuseq,.menu{color:rgba(0,0,0,.8)} -b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} -b.button:before{content:"[";padding:0 3px 0 2px} -b.button:after{content:"]";padding:0 2px 0 3px} -p a>code:hover{color:rgba(0,0,0,.9)} -#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} -#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} -#header:after,#content:after,#footnotes:after,#footer:after{clear:both} -#content{margin-top:1.25em} -#content:before{content:none} -#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} -#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} -#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} -#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} -#header .details span:first-child{margin-left:-.125em} -#header .details span.email a{color:rgba(0,0,0,.85)} -#header .details br{display:none} -#header .details br+span:before{content:"\00a0\2013\00a0"} -#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} -#header .details br+span#revremark:before{content:"\00a0|\00a0"} -#header #revnumber{text-transform:capitalize} -#header #revnumber:after{content:"\00a0"} -#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} -#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} -#toc>ul{margin-left:.125em} -#toc ul.sectlevel0>li>a{font-style:italic} -#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} -#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} -#toc a{text-decoration:none} -#toc a:active{text-decoration:underline} -#toctitle{color:#7a2518;font-size:1.2em} -@media only screen and (min-width:768px){#toctitle{font-size:1.375em} -body.toc2{padding-left:15em;padding-right:0} -#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} -#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} -#toc.toc2>ul{font-size:.9em;margin-bottom:0} -#toc.toc2 ul ul{margin-left:0;padding-left:1em} -#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} -body.toc2.toc-right{padding-left:0;padding-right:15em} -body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} -#toc.toc2{width:20em} -#toc.toc2 #toctitle{font-size:1.375em} -#toc.toc2>ul{font-size:.95em} -#toc.toc2 ul ul{padding-left:1.25em} -body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -#content #toc>:first-child{margin-top:0} -#content #toc>:last-child{margin-bottom:0} -#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} -#footer-text{color:rgba(255,255,255,.8);line-height:1.44} -.sect1{padding-bottom:.625em} -@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} -#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} -#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} -#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} -#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} -#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} -.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} -.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} -table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} -.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} -table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} -.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} -.admonitionblock>table td.icon{text-align:center;width:80px} -.admonitionblock>table td.icon img{max-width:none} -.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} -.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} -.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} -.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} -.exampleblock>.content>:first-child{margin-top:0} -.exampleblock>.content>:last-child{margin-bottom:0} -.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -.sidebarblock>:first-child{margin-top:0} -.sidebarblock>:last-child{margin-bottom:0} -.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} -.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} -.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} -.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} -.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} -.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} -@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} -.listingblock pre.highlightjs{padding:0} -.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} -.listingblock pre.prettyprint{border-width:0} -.listingblock>.content{position:relative} -.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} -.listingblock:hover code[data-lang]:before{display:block} -.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} -.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} -table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} -table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} -table.pyhltable td.code{padding-left:.75em;padding-right:0} -pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} -pre.pygments .lineno{display:inline-block;margin-right:.25em} -table.pyhltable .linenodiv{background:none!important;padding-right:0!important} -.quoteblock{margin:0 1em 1.25em 1.5em;display:table} -.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} -.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} -.quoteblock blockquote{margin:0;padding:0;border:0} -.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} -.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} -.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} -.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} -.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} -.quoteblock .quoteblock blockquote:before{display:none} -.verseblock{margin:0 1em 1.25em 1em} -.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} -.verseblock pre strong{font-weight:400} -.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} -.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} -.quoteblock .attribution br,.verseblock .attribution br{display:none} -.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} -.quoteblock.abstract{margin:0 0 1.25em 0;display:block} -.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} -.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} -table.tableblock{max-width:100%;border-collapse:separate} -table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} -table.spread{width:100%} -table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} -table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} -table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} -table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} -table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} -table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} -table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} -table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} -table.frame-all{border-width:1px} -table.frame-sides{border-width:0 1px} -table.frame-topbot{border-width:1px 0} -th.halign-left,td.halign-left{text-align:left} -th.halign-right,td.halign-right{text-align:right} -th.halign-center,td.halign-center{text-align:center} -th.valign-top,td.valign-top{vertical-align:top} -th.valign-bottom,td.valign-bottom{vertical-align:bottom} -th.valign-middle,td.valign-middle{vertical-align:middle} -table thead th,table tfoot th{font-weight:bold} -tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} -tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} -p.tableblock>code:only-child{background:none;padding:0} -p.tableblock{font-size:1em} -td>div.verse{white-space:pre} -ol{margin-left:1.75em} -ul li ol{margin-left:1.5em} -dl dd{margin-left:1.125em} -dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} -ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} -ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} -ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} -ul.checklist li>p:first-child>.fa-check-square-o:first-child,ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em} -ul.checklist li>p:first-child>input[type="checkbox"]:first-child{position:relative;top:1px} -ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} -ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} -ul.inline>li>*{display:block} -.unstyled dl dt{font-weight:400;font-style:normal} -ol.arabic{list-style-type:decimal} -ol.decimal{list-style-type:decimal-leading-zero} -ol.loweralpha{list-style-type:lower-alpha} -ol.upperalpha{list-style-type:upper-alpha} -ol.lowerroman{list-style-type:lower-roman} -ol.upperroman{list-style-type:upper-roman} -ol.lowergreek{list-style-type:lower-greek} -.hdlist>table,.colist>table{border:0;background:none} -.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} -td.hdlist1{padding-right:.75em;font-weight:bold} -td.hdlist1,td.hdlist2{vertical-align:top} -.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} -.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} -.colist>table tr>td:last-of-type{padding:.25em 0} -.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} -.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} -.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} -.imageblock>.title{margin-bottom:0} -.imageblock.thumb,.imageblock.th{border-width:6px} -.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} -.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} -.image.left{margin-right:.625em} -.image.right{margin-left:.625em} -a.image{text-decoration:none} -span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} -span.footnote a,span.footnoteref a{text-decoration:none} -span.footnote a:active,span.footnoteref a:active{text-decoration:underline} -#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} -#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} -#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} -#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} -#footnotes .footnote:last-of-type{margin-bottom:0} -#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} -.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} -.gist .file-data>table td.line-data{width:99%} -div.unbreakable{page-break-inside:avoid} -.big{font-size:larger} -.small{font-size:smaller} -.underline{text-decoration:underline} -.overline{text-decoration:overline} -.line-through{text-decoration:line-through} -.aqua{color:#00bfbf} -.aqua-background{background-color:#00fafa} -.black{color:#000} -.black-background{background-color:#000} -.blue{color:#0000bf} -.blue-background{background-color:#0000fa} -.fuchsia{color:#bf00bf} -.fuchsia-background{background-color:#fa00fa} -.gray{color:#606060} -.gray-background{background-color:#7d7d7d} -.green{color:#006000} -.green-background{background-color:#007d00} -.lime{color:#00bf00} -.lime-background{background-color:#00fa00} -.maroon{color:#600000} -.maroon-background{background-color:#7d0000} -.navy{color:#000060} -.navy-background{background-color:#00007d} -.olive{color:#606000} -.olive-background{background-color:#7d7d00} -.purple{color:#600060} -.purple-background{background-color:#7d007d} -.red{color:#bf0000} -.red-background{background-color:#fa0000} -.silver{color:#909090} -.silver-background{background-color:#bcbcbc} -.teal{color:#006060} -.teal-background{background-color:#007d7d} -.white{color:#bfbfbf} -.white-background{background-color:#fafafa} -.yellow{color:#bfbf00} -.yellow-background{background-color:#fafa00} -span.icon>.fa{cursor:default} -.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} -.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} -.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} -.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} -.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} -.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} -.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} -.conum[data-value] *{color:#fff!important} -.conum[data-value]+b{display:none} -.conum[data-value]:after{content:attr(data-value)} -pre .conum[data-value]{position:relative;top:-.125em} -b.conum *{color:inherit!important} -.conum:not([data-value]):empty{display:none} -h1,h2{letter-spacing:-.01em} -dt,th.tableblock,td.content{text-rendering:optimizeLegibility} -p,td.content{letter-spacing:-.01em} -p strong,td.content strong{letter-spacing:-.005em} -p,blockquote,dt,td.content{font-size:1.0625rem} -p{margin-bottom:1.25rem} -.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} -.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} -.print-only{display:none!important} -@media print{@page{margin:1.25cm .75cm} -*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} -a{color:inherit!important;text-decoration:underline!important} -a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} -a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} -abbr[title]:after{content:" (" attr(title) ")"} -pre,blockquote,tr,img{page-break-inside:avoid} -thead{display:table-header-group} -img{max-width:100%!important} -p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} -h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} -#toc,.sidebarblock,.exampleblock>.content{background:none!important} -#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} -.sect1{padding-bottom:0!important} -.sect1+.sect1{border:0!important} -#header>h1:first-child{margin-top:1.25rem} -body.book #header{text-align:center} -body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} -body.book #header .details{border:0!important;display:block;padding:0!important} -body.book #header .details span:first-child{margin-left:0!important} -body.book #header .details br{display:block} -body.book #header .details br+span:before{content:none!important} -body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} -body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} -.listingblock code[data-lang]:before{display:block} -#footer{background:none!important;padding:0 .9375em} -#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} -.hide-on-print{display:none!important} -.print-only{display:block!important} -.hide-for-print{display:none!important} -.show-for-print{display:inherit!important}} -</style> -<style> -.listingblock .pygments .hll { background-color: #ffffcc } -.listingblock .pygments { background: #f0f0f0; } -.listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ -.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ -.listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ -.listingblock .pygments .tok-o { color: #666666 } /* Operator */ -.listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ -.listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ -.listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ -.listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ -.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ -.listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ -.listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ -.listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ -.listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ -.listingblock .pygments .tok-gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ -.listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ -.listingblock .pygments .tok-kc { color: #007020; font-weight: bold } /* Keyword.Constant */ -.listingblock .pygments .tok-kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ -.listingblock .pygments .tok-kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ -.listingblock .pygments .tok-kp { color: #007020 } /* Keyword.Pseudo */ -.listingblock .pygments .tok-kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ -.listingblock .pygments .tok-kt { color: #902000 } /* Keyword.Type */ -.listingblock .pygments .tok-m { color: #40a070 } /* Literal.Number */ -.listingblock .pygments .tok-s { color: #4070a0 } /* Literal.String */ -.listingblock .pygments .tok-na { color: #4070a0 } /* Name.Attribute */ -.listingblock .pygments .tok-nb { color: #007020 } /* Name.Builtin */ -.listingblock .pygments .tok-nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.listingblock .pygments .tok-no { color: #60add5 } /* Name.Constant */ -.listingblock .pygments .tok-nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.listingblock .pygments .tok-ni { color: #d55537; font-weight: bold } /* Name.Entity */ -.listingblock .pygments .tok-ne { color: #007020 } /* Name.Exception */ -.listingblock .pygments .tok-nf { color: #06287e } /* Name.Function */ -.listingblock .pygments .tok-nl { color: #002070; font-weight: bold } /* Name.Label */ -.listingblock .pygments .tok-nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.listingblock .pygments .tok-nt { color: #062873; font-weight: bold } /* Name.Tag */ -.listingblock .pygments .tok-nv { color: #bb60d5 } /* Name.Variable */ -.listingblock .pygments .tok-ow { color: #007020; font-weight: bold } /* Operator.Word */ -.listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ -.listingblock .pygments .tok-mb { color: #40a070 } /* Literal.Number.Bin */ -.listingblock .pygments .tok-mf { color: #40a070 } /* Literal.Number.Float */ -.listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ -.listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ -.listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ -.listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ -.listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ -.listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ -.listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.listingblock .pygments .tok-sh { color: #4070a0 } /* Literal.String.Heredoc */ -.listingblock .pygments .tok-si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.listingblock .pygments .tok-sx { color: #c65d09 } /* Literal.String.Other */ -.listingblock .pygments .tok-sr { color: #235388 } /* Literal.String.Regex */ -.listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ -.listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ -.listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ -.listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ -.listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ -.listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ -.listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ -</style> -</head> -<body class="article toc2 toc-left"> -<div id="header"> -<h1>Cats Documentation</h1> -<div class="details"> -<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.2.0</span> -</div> -<div id="toc" class="toc2"> -<div id="toctitle">Table of Contents</div> -<ul class="sectlevel1"> -<li><a href="#_introduction">1. Introduction</a> -<ul class="sectlevel2"> -<li><a href="#_why_another_library">1.1. Why another library?</a></li> -</ul> -</li> -<li><a href="#_project_maturity">2. Project Maturity</a></li> -<li><a href="#_install">3. Install</a> -<ul class="sectlevel2"> -<li><a href="#_leiningen">3.1. Leiningen</a></li> -<li><a href="#_maven">3.2. Maven</a></li> -<li><a href="#_get_the_code">3.3. Get the Code</a></li> -</ul> -</li> -<li><a href="#_user_guide">4. User Guide</a> -<ul class="sectlevel2"> -<li><a href="#_functor">4.1. Functor</a></li> -<li><a href="#_applicative">4.2. Applicative</a></li> -<li><a href="#_monad">4.3. Monad</a></li> -<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> -</ul> -</li> -<li><a href="#_monad_types">5. Monad types</a> -<ul class="sectlevel2"> -<li><a href="#_maybe">5.1. Maybe</a></li> -<li><a href="#_either">5.2. Either</a></li> -<li><a href="#_try">5.3. Try</a></li> -<li><a href="#_state">5.4. State</a></li> -<li><a href="#_reader">5.5. Reader</a></li> -<li><a href="#_writer">5.6. Writer</a></li> -<li><a href="#_continuation">5.7. Continuation</a></li> -<li><a href="#_lazy">5.8. Lazy</a></li> -<li><a href="#_vector">5.9. Vector</a></li> -</ul> -</li> -<li><a href="#_faq">6. FAQ</a> -<ul class="sectlevel2"> -<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</a></li> -</ul> -</li> -<li><a href="#_how_to_contribute">7. How to Contribute?</a> -<ul class="sectlevel2"> -<li><a href="#_philosophy">7.1. Philosophy</a></li> -<li><a href="#_procedure">7.2. Procedure</a></li> -<li><a href="#_license">7.3. License</a></li> -</ul> -</li> -</ul> -</div> -</div> -<div id="content"> -<div id="preamble"> -<div class="sectionbody"> -<div class="paragraph"> -<p><span class="image"><img src="logo.png" alt="cats logo"></span></p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_introduction">1. Introduction</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>Category Theory abstractions for Clojure.</p> -</div> -<div class="sect2"> -<h3 id="_why_another_library">1.1. Why another library?</h3> -<div class="paragraph"> -<p>Because cats library:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> -</li> -<li> -<p>aims to have the most simple implementation for supported abstractions.</p> -</li> -<li> -<p>aims to have more abstractions that are simple monads.</p> -</li> -<li> -<p>has documentation as first class citizen.</p> -</li> -<li> -<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> -</li> -</ul> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_project_maturity">2. Project Maturity</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> breakage.</p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_install">3. Install</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>This section covers installing <em>cats</em>.</p> -</div> -<div class="sect2"> -<h3 id="_leiningen">3.1. Leiningen</h3> -<div class="paragraph"> -<p>The simplest way to use <em>cats</em> in a Clojure project is by including -it as a dependency in your <strong><em>project.clj</em></strong>:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.2.0-SNAPSHOT"</span><span class="tok-p">]</span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_maven">3.2. Maven</h3> -<div class="paragraph"> -<p>Also, you can use it with maven. First, add the clojars repository:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> - <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> - <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> -<span class="tok-nt"></repository></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Then for cats:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> - <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> - <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.2.0-SNAPSHOT<span class="tok-nt"></version></span> -<span class="tok-nt"></dependency></span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_get_the_code">3.3. Get the Code</h3> -<div class="paragraph"> -<p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p> -</div> -<div class="paragraph"> -<p>You can clone the public repository with this command:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/niwibe/cats</code></pre> -</div> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_user_guide">4. User Guide</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>This section introduces almost all category theory abstractios that cats library -supports.</p> -</div> -<div class="paragraph"> -<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all -abstractions and it very easy to understand. You can read more about it in the next -section of this documentation.</p> -</div> -<div class="sect2"> -<h3 id="_functor">4.1. Functor</h3> -<div class="paragraph"> -<p>Let start with functor. The Functor represents some sort of "computational context", and the -abstraction consists in one unique function: <strong>fmap</strong>.</p> -</div> -<div class="listingblock"> -<div class="title">Signature of <strong>fmap</strong> function</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The high order function <strong>fmap</strong> takes a plain function as first parameter and -value wrapped in functor context as second parameter. It extracts the inner value -apply the function to it, and return the result wrapped in same type as the second -parameter.</p> -</div> -<div class="paragraph"> -<p>But, what is the <strong>*functor context</strong>? It sonds more complex that it is. Functor -wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocol.</p> -</div> -<div class="paragraph"> -<p>One good example of functor context is the <strong>Maybe</strong> type:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p><strong>just</strong> is one of two constructors of <strong>Maybe</strong> type and it’s only wraps the real -value. Now, let see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>But <strong>Maybe</strong> has another constructor: <code>maybe/nothing</code>. This constructor makes -empty object that not wraps anything. Is the safe substitute of <code>nil</code> and -represents the failure.</p> -</div> -<div class="paragraph"> -<p>Let see that is happens if we make same operation of previous example over -<strong>nothing</strong> instance:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Oh, awesome, instead of raising null pointer exception, it just return <strong>nothing</strong>.</p> -</div> -<div class="paragraph"> -<p>An other good advantage of use functor abstraction, is that it always return result -in the same type of second argument</p> -</div> -<div class="paragraph"> -<p>Let see one example of apply fmap over clojure vector:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [2 3 4]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The main difference compared to the previous example with default clojure map, is that the clojure -map works with seqs and doesn’t respect the input container:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => (2 3 4)</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>But why fmap works with vectors? Because some "container" types of clojure like vectors, -lists or sets also implements the functor abstraction.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_applicative">4.2. Applicative</h3> -<div class="paragraph"> -<p>Let continue with applicative function. The Applicative Functor represents -some sort of "computational context" like plain Functor, but with abilty of -execute a function wrapped in same context.</p> -</div> -<div class="paragraph"> -<p>Applicative Functor abstraction consists in two functions: <strong>fapply</strong> and -<strong>pure</strong>.</p> -</div> -<div class="listingblock"> -<div class="title">Signature of <strong>fapply</strong> function</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -<strong>pure</strong> function it will be explained later. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>The use case of Applicative Functors is much same as of plain Functors: safe -evaluation of some computation in a context.</p> -</div> -<div class="paragraph"> -<p>Let see one exaple for understand better the differences between functor and -applicative functor:</p> -</div> -<div class="paragraph"> -<p>Imagine, you have some factory function that depending of language, return a -greater function and you only has support for few languages.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> - <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> - <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> - <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> - <span class="tok-nv">nil</span><span class="tok-p">))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Now, if you want to use it, you should always defensively check if returned -greater is a valid function or is a nil value.</p> -</div> -<div class="paragraph"> -<p>Lets go to convert this factory to use Maybe type:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> - <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> - <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> - <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> - <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As you can observe, this version of factory differs little bit from the -original implementation. And this little change makes you superpower: you -can apply the returned greater to any value without defensive nil checking:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hola Alex]></span> - -<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hello Alex]></span> - -<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Moreover the applicative functor comes with <strong>pure</strong> function, and main purpose of this function is -put some value in side effect free contex of the current type.</p> -</div> -<div class="paragraph"> -<p>Examples:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [5]></span> - -<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>If you not understand the purpose of <strong>pure</strong> function, it is possible that the next section -can clarify the real purpose of it.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_monad">4.3. Monad</h3> -<div class="paragraph"> -<p>Monads are the most discussed programming concept to come from category theory. Like functors and -applicatives, monads deal with data in contexts.</p> -</div> -<div class="paragraph"> -<p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and -put new values in a completely different context.</p> -</div> -<div class="paragraph"> -<p>The monad abstraction consists on two functions: <strong>bind</strong> and <strong>return</strong></p> -</div> -<div class="listingblock"> -<div class="title">Bind function signature.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As you can observe, it works much like Functor but with inverted arguments, the main deference is -that in monad, the function is a responsible of wrapping a retuned value in a context.</p> -</div> -<div class="listingblock"> -<div class="title">Usage example of bind high order function.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>One of the key features of the bind function is that any computation executed inside of context of -bind (monad) knows the context type implicitly. Having this, if you apply some computation over some -monadic value and you want to return the result in the same container context but you don’t know -that container is it, you can use <code>return</code> or <code>pure</code> functions:</p> -</div> -<div class="listingblock"> -<div class="title">Usage of return function in bind context.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context -value that’s set internally by the <code>bind</code> function. Therefore you can’t use them with one argument out -of a <code>bind</code> context.</p> -</div> -<div class="paragraph"> -<p>At this time, everything is fine, we not can compose any number of computations using monad <strong>*bind</strong> -functions. But that is happens where the number of computations increases:</p> -</div> -<div class="listingblock"> -<div class="title">Composability example of bind function.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>This easy grows to very beatiful callback hell. For solve this, <em>cats</em> comes with powerful -macro: <strong>mlet</strong></p> -</div> -<div class="listingblock"> -<div class="title">Previous example but using <strong>mlet</strong> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -If you are coming from haskell, it represents the <strong>do-syntax</strong>. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>If you want to use regular (non-monadic) let bindings inside a <code>mlet</code> block, you can do so using -<code>:let</code> and a bindings vector as a pair inside the mlet bindings:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))</span> - <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_monad_transformers">4.4. Monad Transformers</h3> -<div class="sect3"> -<h4 id="_motivation">4.4.1. Motivation</h4> -<div class="paragraph"> -<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, -we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> - <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> - -<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> -<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> -<span class="tok-c1">; contain a value of any type.</span> -<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> -<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>However, monads don’t compose as nicely as functors do. We have to actually implement -the composition ourselves.</p> -</div> -<div class="paragraph"> -<p>In some circumstances we would like combine the effects of two monads in another one. We call the -resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A -monad transformer is itself a monad.</p> -</div> -</div> -<div class="sect3"> -<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> -<div class="paragraph"> -<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer -using State as the base monad, since we want the resulting type to be a stateful computation -that may fail: <code>s -> Maybe (a, s)</code>.</p> -</div> -<div class="paragraph"> -<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with -any other monad. The transformer creating functions take a Monad as their argument and their -return a reified MonadTrans:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> - -<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful -function that, when run, yields a Maybe containing a pair (value, next state).</p> -</div> -<div class="paragraph"> -<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. -When working with monad transformers we have to be explicit about what monad are we using to implement -the binding policy since there is no way to distinguish values from a transformer type from those of -a regular monad.</p> -</div> -<div class="paragraph"> -<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> -</div> -<div class="paragraph"> -<p>Let’s see it in action:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> - <span class="tok-s">"A function that takes an input string as an state and</span> -<span class="tok-s"> consumes one character yielding it as a the value. The</span> -<span class="tok-s"> new state is the input string with the character consumed.</span> - -<span class="tok-s"> It fails when there isn't a character to consume."</span> - <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Nothing ></span> - -<span class="tok-c1">; We could have written `any-two-chars` more succintly using `cats.core/mlet-with`,</span> -<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> - -<span class="tok-c1">; We also define a function for applying parser to a given input</span> -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> -</div> -</div> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_monad_types">5. Monad types</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>Monad as is, is an abstraction, and we have seen two types in examples that implements -the monad abstraction: Maybe and Either. But they are the smallest part of types -that implements the Monad abstraction. In this section we try explain different -monad types supported by <em>cats</em> library.</p> -</div> -<div class="sect2"> -<h3 id="_maybe">5.1. Maybe</h3> -<div class="paragraph"> -<p>This is one of the two most used monad types (commonly named Optional in non-functional programming -languages).</p> -</div> -<div class="paragraph"> -<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is -used as the return type of functions which may or may not return a meaningful value when they -are applied. It consists of either an empty constructor (called None or Nothing), or a constructor -encapsulating the original data type A (written Just A or Some A).</p> -</div> -<div class="paragraph"> -<p><em>cats</em>, implements two constructors:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>(just v)</code>: represents just a value in a context.</p> -</li> -<li> -<p><code>(nothing)</code>: represents a failure or null.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [1]></span> -<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Maybe types are: Functors, Applicative Functors and Monads -</td> -</tr> -</table> -</div> -</div> -<div class="sect2"> -<h3 id="_either">5.2. Either</h3> -<div class="paragraph"> -<p>Either is another type that represents a result of computation, but in contrast with maybe -it can return some data with a failed computation result.</p> -</div> -<div class="paragraph"> -<p>In <em>cats</em> it has two constructors:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>(left v)</code>: represents a failure.</p> -</li> -<li> -<p><code>(right v)</code>: represents a successful result.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>Either</strong> constructors.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Right [:valid-value :right]></span> - -<span class="tok-p">(</span><span class="tok-nb">left </span><span class="tok-s">"Error message"</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Either [Error message :left]></span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Either is also (like Maybe) Functor, Applicative Functor and Monad. -</td> -</tr> -</table> -</div> -</div> -<div class="sect2"> -<h3 id="_try">5.3. Try</h3> -<div class="paragraph"> -<p>Also called Exception.</p> -</div> -<div class="paragraph"> -<p>The <code>Try</code> type represents a computation that may either result in an exception, -or return a successfully computed value. It’s similar to, but semantically -different from the <code>Either</code> type.</p> -</div> -<div class="paragraph"> -<p>It’s an analogue for the try-catch block: it replaces try-catch’s stack based error -handling with heap based error handling. Instead of having an exception thrown and -having to deal with it immediately in the same thread, it disconnects the error -handling and recovery.</p> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>try-on</strong> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Success [1]></span> - -<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Failure [#<NullPointerException java.lang.NullPointerException>]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>For make it more powerfull, <em>cats</em> comes with other sugar syntax macros: <code>try-or-else</code> that -returns a default value if a computation fails and <code>try-or-recover</code> that make the -facility of handle yourself the return value executing a function with the exception as -first parameter.</p> -</div> -<div class="listingblock"> -<div class="title">Usage example of <code>try-or-else</code> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Success [2]></span></code></pre> -</div> -</div> -<div class="listingblock"> -<div class="title">Usage example of <code>try-or-recover</code> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">cond</span> - <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> - <span class="tok-ss">:else</span> <span class="tok-mi">100</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => #<Success [0]></span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Try is also (like Maybe) Functor, Applicative Functor and Monad. -</td> -</tr> -</table> -</div> -</div> -<div class="sect2"> -<h3 id="_state">5.4. State</h3> -<div class="paragraph"> -<p>State monad in one of the special use cases of monads most used in haskell. It has different -purposes including: lazy computation composition and maintaining state without explicit state.</p> -</div> -<div class="paragraph"> -<p>The de facto monadic type of the state monad is a plain function. Function represents a computation -as is (without executing it). Obviously, a function should have some special characteristics to work -in monad state composition.</p> -</div> -<div class="listingblock"> -<div class="title">Valid function for valid state monad</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> - <span class="tok-s">"Takes state as argument and return a vector</span> -<span class="tok-s"> with first argument with procesed value and</span> -<span class="tok-s"> second argument the transformed new state."</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> - <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> - <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Right, you just saw an example of the low level primitive of state monad but for basic usage -you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p> -</div> -<div class="paragraph"> -<p>Let’s look at one example before explaining the details:</p> -</div> -<div class="listingblock"> -<div class="title">Lazy composition of computations</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> - <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> -<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>At the moment of evaluating the previous expression, anything that we have defined -is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p> -</div> -<div class="paragraph"> -<p>State is a simple wrapper for clojure functions, nothing more.</p> -</div> -<div class="paragraph"> -<p>Now, it time to execute the composed computation, for this we can use one of the following -functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>run-state</code> function executes the composed computation and returns both the value and the -result state.</p> -</li> -<li> -<p><code>eval-state</code> function executes the composed computation and returns the resulting value -discarding the state.</p> -</li> -<li> -<p><code>exec-state</code> function executes the composed computation and return only the resulting -state, ignoring the resulting value.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> -<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> 1</span> -<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> (2 3)</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -the pair instance returned by <code>run-state</code> functions works like any other seq of clojure, with -the difference that pairs can only have two slots. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them -seems out of the scope of this document.</p> -</div> -<div class="paragraph"> -<p>However, if you have better examples to explain the state monad, documentation for another monad or -any other contribution is always welcome.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_reader">5.5. Reader</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_writer">5.6. Writer</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_continuation">5.7. Continuation</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_lazy">5.8. Lazy</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_vector">5.9. Vector</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_faq">6. FAQ</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> -<div class="paragraph"> -<p>This is an incomplete list of differences with other existing libraries:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling -is slighty limited (e.g. you always need to specify what monad you want use instead of -relying on the type). And obviously because it only has monads.</p> -</li> -<li> -<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big -difference with fluokitten is that <code>cats</code> doesn’t aim to extend every clojure type -with monadic protocols, for the obvious reason that monad; functor and applicative represents -context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> -</li> -<li> -<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation -has much unnecesary complexity.</p> -</li> -</ul> -</div> -</div> -<div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</h3> -<div class="paragraph"> -<p>In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types -that don’t act like containers. For example, clojure keywords are values but can not be containers so -they should not extend any of the previously explained protocols.</p> -</div> -<table class="tableblock frame-all grid-all spread"> -<caption class="title">Table 1. Summary of clojure types and implemented protocols</caption> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top">Name</th> -<th class="tableblock halign-left valign-top">Implemented protocols</th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -</tbody> -</table> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_how_to_contribute">7. How to Contribute?</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_philosophy">7.1. Philosophy</h3> -<div class="paragraph"> -<p>Five most important rules:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Beautiful is better than ugly.</p> -</li> -<li> -<p>Explicit is better than implicit.</p> -</li> -<li> -<p>Simple is better than complex.</p> -</li> -<li> -<p>Complex is better than complicated.</p> -</li> -<li> -<p>Readability counts.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p>All contributions to <em>cats</em> should keep these important rules in mind.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_procedure">7.2. Procedure</h3> -<div class="paragraph"> -<p><em>cats</em> unlike Clojure and other Clojure contrib libs, does not have many -restrictions for contributions. Just follow the following steps depending on the -situation:</p> -</div> -<div class="paragraph"> -<p><strong>Bugfix</strong>:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Fork the GitHub repo.</p> -</li> -<li> -<p>Fix a bug/typo on a new branch.</p> -</li> -<li> -<p>Make a pull-request to master.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p><strong>New feature</strong>:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Open new issue with the new feature proposal.</p> -</li> -<li> -<p>If it is accepted, follow the same steps as "bugfix".</p> -</li> -</ul> -</div> -</div> -<div class="sect2"> -<h3 id="_license">7.3. License</h3> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014, Andrey Antukh -Copyright (c) 2014, Alejandro Gómez - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</code></pre> -</div> -</div> -</div> -</div> -</div> -</div> -<div id="footer"> -<div id="footer-text"> -Last updated 2014-10-25 01:28:38 CEST -</div> -</div> -</body> -</html> \ No newline at end of file From 5ff1571fe751affe9e79e264d160f14e8318e085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Thu, 30 Oct 2014 13:44:45 +0100 Subject: [PATCH 27/52] Update dev doc --- index.html | 259 ++++++++++++++++++++++++++--------------------------- 1 file changed, 129 insertions(+), 130 deletions(-) diff --git a/index.html b/index.html index d73c9bf..10d2003 100644 --- a/index.html +++ b/index.html @@ -522,7 +522,7 @@ <h1>Cats Documentation</h1> <li><a href="#_faq">6. FAQ</a> <ul class="sectlevel2"> <li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</a></li> </ul> </li> <li><a href="#_how_to_contribute">7. How to Contribute?</a> @@ -552,15 +552,15 @@ <h2 id="_introduction">1. Introduction</h2> <div class="sect2"> <h3 id="_why_another_library">1.1. Why another library?</h3> <div class="paragraph"> -<p>Because cats library:</p> +<p>Because the cats library:</p> </div> <div class="ulist"> <ul> <li> -<p>targets both most used clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> +<p>targets both of the most-used Clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> </li> <li> -<p>aims to have the most simple implementation for supported abstractions.</p> +<p>aims to have the simplest implementation of the supported abstractions.</p> </li> <li> <p>aims to have more abstractions that are simple monads.</p> @@ -580,7 +580,7 @@ <h3 id="_why_another_library">1.1. Why another library?</h3> <h2 id="_project_maturity">2. Project Maturity</h2> <div class="sectionbody"> <div class="paragraph"> -<p>Since <em>cats</em> is a young project there can be some <a href="codox/index.html#id">API</a> breakage.</p> +<p>Since <em>cats</em> is a young project, there can be some <a href="codox/index.html#id">API</a> breakage.</p> </div> </div> </div> @@ -605,7 +605,7 @@ <h3 id="_leiningen">3.1. Leiningen</h3> <div class="sect2"> <h3 id="_maven">3.2. Maven</h3> <div class="paragraph"> -<p>Also, you can use it with maven. First, add the clojars repository:</p> +<p>Also, you can use it with Maven. First, add the Clojars repository:</p> </div> <div class="listingblock"> <div class="content"> @@ -631,7 +631,7 @@ <h3 id="_maven">3.2. Maven</h3> <div class="sect2"> <h3 id="_get_the_code">3.3. Get the Code</h3> <div class="paragraph"> -<p><em>cats</em> is opensource and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p> +<p><em>cats</em> is open source and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p> </div> <div class="paragraph"> <p>You can clone the public repository with this command:</p> @@ -648,40 +648,40 @@ <h3 id="_get_the_code">3.3. Get the Code</h3> <h2 id="_user_guide">4. User Guide</h2> <div class="sectionbody"> <div class="paragraph"> -<p>This section introduces almost all category theory abstractios that cats library +<p>This section introduces almost all the category theory abstractions that the <em>cats</em> library supports.</p> </div> <div class="paragraph"> <p>We will use the <em>Maybe</em> for the example snippets, because it has support for all -abstractions and it very easy to understand. You can read more about it in the next -section of this documentation.</p> +the abstractions and it is very easy to understand. You can read more about it in the next +section of the documentation.</p> </div> <div class="sect2"> <h3 id="_functor">4.1. Functor</h3> <div class="paragraph"> -<p>Let start with functor. The Functor represents some sort of "computational context", and the -abstraction consists in one unique function: <strong>fmap</strong>.</p> +<p>Let’s start with the functor. The Functor represents some sort of "computational context", and the +abstraction consists of one unique function: <strong>fmap</strong>.</p> </div> <div class="listingblock"> <div class="title">Signature of <strong>fmap</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> -<p>The high order function <strong>fmap</strong> takes a plain function as first parameter and -value wrapped in functor context as second parameter. It extracts the inner value -apply the function to it, and return the result wrapped in same type as the second +<p>The higher-order function <strong>fmap</strong> takes a plain function as the first parameter and +value wrapped in a functor context as the second parameter. It extracts the inner value +applies the function to it, and returns the result wrapped in same type as the second parameter.</p> </div> <div class="paragraph"> -<p>But, what is the <strong>*functor context</strong>? It sonds more complex that it is. Functor -wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocol.</p> +<p>But, what is the <strong>*functor context</strong>? It sounds more complex than it is. A Functor +wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> </div> <div class="listingblock"> -<div class="title">One good example of functor is the <strong>Maybe</strong> type:</div> +<div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-c1">;; `just` function is one of two constructors of Maybe</span> @@ -695,71 +695,71 @@ <h3 id="_functor">4.1. Functor</h3> <div class="listingblock"> <div class="title">Example using fmap over <strong>just</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just [2]></span></code></pre> </div> </div> <div class="paragraph"> -<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It that represents the aucense of value. -Is the safe substitute of <code>nil</code> and may represent the failure.</p> +<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absense of a value. +It is a safe substitute for <code>nil</code> and may represent failure.</p> </div> <div class="paragraph"> -<p>Let see that is happens if we make same operation of previous example over <strong>nothing</strong> instance:</p> +<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> instance:</p> </div> <div class="listingblock"> <div class="title">Example using fmap over <strong>nothing</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> <div class="paragraph"> -<p>Oh, awesome, instead of raising null pointer exception, it just return <strong>nothing</strong>. An other good -advantage of use functor abstraction, is that it always return result -in the same type of second argument.</p> +<p>Oh, awesome, instead of raising a <code>NullPointerException</code>, it just returns <strong>nothing</strong>. Another +advantage of using the functor abstraction, is that it always returns a result +of the same type as its second argument.</p> </div> <div class="paragraph"> -<p>Let see one example of apply fmap over clojure vector:</p> +<p>Let’s see an example of applying fmap over a Clojure vector:</p> </div> <div class="listingblock"> <div class="title">Example using fmav over <strong>vector</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 3 4]</span></code></pre> </div> </div> <div class="paragraph"> -<p>The main difference compared to the previous example with default clojure map, is that the clojure +<p>The main difference compared to the previous example with Clojure’s map function, is that map works with seqs and doesn’t respect the input container:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => (2 3 4)</span></code></pre> </div> </div> <div class="paragraph"> -<p>But why fmap works with vectors? Because some "container" types of clojure like vectors, -lists or sets also implements the functor abstraction.</p> +<p>But why does the fmap version "work" with vectors? Because some Clojure container types like vectors, +lists, and sets also implement the functor abstraction.</p> </div> </div> <div class="sect2"> <h3 id="_applicative">4.2. Applicative</h3> <div class="paragraph"> -<p>Let continue with applicative function. The Applicative Functor represents -some sort of "computational context" like plain Functor, but with abilty of -execute a function wrapped in same context.</p> +<p>Let’s continue with applicative functors. The Applicative Functor represents +some sort of "computational context" like a plain Functor, but with abilty to +execute a function wrapped in the same context.</p> </div> <div class="paragraph"> -<p>Applicative Functor abstraction consists in two functions: <strong>fapply</strong> and +<p>The Applicative Functor abstraction consists of two functions: <strong>fapply</strong> and <strong>pure</strong>.</p> </div> <div class="listingblock"> <div class="title">Signature of <strong>fapply</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="admonitionblock note"> @@ -769,26 +769,26 @@ <h3 id="_applicative">4.2. Applicative</h3> <div class="title">Note</div> </td> <td class="content"> -<strong>pure</strong> function it will be explained later. +the <strong>pure</strong> function will be explained later. </td> </tr> </table> </div> <div class="paragraph"> -<p>The use case of Applicative Functors is much same as of plain Functors: safe +<p>The use case for Applicative Functors is much the same as plain Functors: safe evaluation of some computation in a context.</p> </div> <div class="paragraph"> -<p>Let see one exaple for understand better the differences between functor and +<p>Let’s see an exaple to better understand the differences between functor and applicative functor:</p> </div> <div class="paragraph"> -<p>Imagine, you have some factory function that depending of language, return a -greater function and you only has support for few languages.</p> +<p>Imagine you have some factory function that, depending on the language, returns a +greeter function, and you only support a few languages.</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> @@ -797,15 +797,15 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> </div> <div class="paragraph"> -<p>Now, if you want to use it, you should always defensively check if returned -greater is a valid function or is a nil value.</p> +<p>Now, before using the resulting greeter you should always defensively check if returned +greeter is a valid function or is a nil value.</p> </div> <div class="paragraph"> -<p>Lets go to convert this factory to use Maybe type:</p> +<p>Let’s convert this factory to use Maybe type:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> @@ -814,13 +814,13 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> </div> <div class="paragraph"> -<p>As you can observe, this version of factory differs little bit from the -original implementation. And this little change makes you superpower: you -can apply the returned greater to any value without defensive nil checking:</p> +<p>As you can see, this version of the factory differs only slightly from the +original implementation. And this tiny change gives you a new superpower: you +can apply the returned greeter to any value without a defensive nil check:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just [Hola Alex]></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> @@ -832,14 +832,14 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="paragraph"> <p>Moreover the applicative functor comes with <strong>pure</strong> function, and main purpose of this function is -put some value in side effect free contex of the current type.</p> +put some value in side-effect-free context of the current type.</p> </div> <div class="paragraph"> <p>Examples:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> @@ -850,8 +850,8 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> </div> <div class="paragraph"> -<p>If you not understand the purpose of <strong>pure</strong> function, it is possible that the next section -can clarify the real purpose of it.</p> +<p>If you do not understand the purpose of the <strong>pure</strong> function, the next section +should clarify its purpose.</p> </div> </div> <div class="sect2"> @@ -861,39 +861,39 @@ <h3 id="_monad">4.3. Monad</h3> applicatives, monads deal with data in contexts.</p> </div> <div class="paragraph"> -<p>Additionaly, monads can also transform context by unwrapping data, applying functions to it and -put new values in a completely different context.</p> +<p>Additionaly, monads can also transform contexts by unwrapping data, applying functions to it and +putting new values in a completely different context.</p> </div> <div class="paragraph"> -<p>The monad abstraction consists on two functions: <strong>bind</strong> and <strong>return</strong></p> +<p>The monad abstraction consists of two functions: <strong>bind</strong> and <strong>return</strong></p> </div> <div class="listingblock"> <div class="title">Bind function signature.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> -<p>As you can observe, it works much like Functor but with inverted arguments, the main deference is -that in monad, the function is a responsible of wrapping a retuned value in a context.</p> +<p>As you can see, bind works much like a Functor but with inverted arguments. The main difference is +that in a monad, the function is a responsible for wrapping a returned value in a context.</p> </div> <div class="listingblock"> -<div class="title">Usage example of bind high order function.</div> +<div class="title">Example usage of the bind higher-order function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> </div> </div> <div class="paragraph"> -<p>One of the key features of the bind function is that any computation executed inside of context of -bind (monad) knows the context type implicitly. Having this, if you apply some computation over some -monadic value and you want to return the result in the same container context but you don’t know -that container is it, you can use <code>return</code> or <code>pure</code> functions:</p> +<p>One of the key features of the bind function is that any computation executed within the context of +bind (monad) knows the context type implicitly. With this, if you apply some computation over some +monadic value and you want to return the result in the same container context but don’t know +what that container is, you can use <code>return</code> or <code>pure</code> functions:</p> </div> <div class="listingblock"> <div class="title">Usage of return function in bind context.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> <span class="tok-c1">;; => #<Just [2]></span></code></pre> @@ -901,17 +901,16 @@ <h3 id="_monad">4.3. Monad</h3> </div> <div class="paragraph"> <p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context -value that’s set internally by the <code>bind</code> function. Therefore you can’t use them with one argument out -of a <code>bind</code> context.</p> +value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> </div> <div class="paragraph"> -<p>At this time, everything is fine, we not can compose any number of computations using monad <strong>*bind</strong> -functions. But that is happens where the number of computations increases:</p> +<p>We now can compose any number of computations using monad <strong>*bind</strong> +functions. But observe what happens when the number of computations increases:</p> </div> <div class="listingblock"> <div class="title">Composability example of bind function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> @@ -919,13 +918,13 @@ <h3 id="_monad">4.3. Monad</h3> </div> </div> <div class="paragraph"> -<p>This easy grows to very beatiful callback hell. For solve this, <em>cats</em> comes with powerful +<p>This can quickly lead to callback hell. To solve this, <em>cats</em> comes with a powerful macro: <strong>mlet</strong></p> </div> <div class="listingblock"> <div class="title">Previous example but using <strong>mlet</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> @@ -937,18 +936,18 @@ <h3 id="_monad">4.3. Monad</h3> <div class="title">Note</div> </td> <td class="content"> -If you are coming from haskell, it represents the <strong>do-syntax</strong>. +If you are coming from Haskell, mlet represents the <strong>do-syntax</strong>. </td> </tr> </table> </div> <div class="paragraph"> -<p>If you want to use regular (non-monadic) let bindings inside a <code>mlet</code> block, you can do so using -<code>:let</code> and a bindings vector as a pair inside the mlet bindings:</p> +<p>If you want to use regular (non-monadic) let bindings inside an <code>mlet</code> block, you can do so using +<code>:let</code> and a binding vector inside the mlet bindings:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))</span> <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> @@ -965,7 +964,7 @@ <h4 id="_motivation">4.4.1. Motivation</h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> @@ -986,7 +985,7 @@ <h4 id="_motivation">4.4.1. Motivation</h4> the composition ourselves.</p> </div> <div class="paragraph"> -<p>In some circumstances we would like combine the effects of two monads in another one. We call the +<p>In some circumstances we would like combine the effects of two monads into another one. We call the resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A monad transformer is itself a monad.</p> </div> @@ -995,17 +994,17 @@ <h4 id="_motivation">4.4.1. Motivation</h4> <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer -using State as the base monad, since we want the resulting type to be a stateful computation +using State as the base monad since we want the resulting type to be a stateful computation that may fail: <code>s -> Maybe (a, s)</code>.</p> </div> <div class="paragraph"> <p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with -any other monad. The transformer creating functions take a Monad as their argument and their +any other monad. The transformer functions take a Monad as their argument and they return a reified MonadTrans:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> @@ -1021,11 +1020,11 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> </div> <div class="paragraph"> <p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful -function that, when run, yields a Maybe containing a pair (value, next state).</p> +function that yields a Maybe containing a pair (value, next state).</p> </div> <div class="paragraph"> <p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. -When working with monad transformers we have to be explicit about what monad are we using to implement +When working with monad transformers, we have to be explicit about what monad we are using to implement the binding policy since there is no way to distinguish values from a transformer type from those of a regular monad.</p> </div> @@ -1037,13 +1036,13 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> <span class="tok-s">"A function that takes an input string as an state and</span> <span class="tok-s"> consumes one character yielding it as a the value. The</span> <span class="tok-s"> new state is the input string with the character consumed.</span> <span class="tok-s"> It fails when there isn't a character to consume."</span> - <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">Clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> @@ -1067,7 +1066,7 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> <span class="tok-c1">;;=> #<Nothing ></span> -<span class="tok-c1">; We could have written `any-two-chars` more succintly using `cats.core/mlet-with`,</span> +<span class="tok-c1">; We could have written `any-two-chars` more succinctly by using `cats.core/mlet-with`,</span> <span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> @@ -1090,15 +1089,15 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> <h2 id="_monad_types">5. Monad types</h2> <div class="sectionbody"> <div class="paragraph"> -<p>Monad as is, is an abstraction, and we have seen two types in examples that implements -the monad abstraction: Maybe and Either. But they are the smallest part of types -that implements the Monad abstraction. In this section we try explain different +<p>In our examples we have seen two types that implement +the monad abstraction: Maybe and Either. But these are only two of the types +that implements the Monad abstraction. In this section, we will explain the different monad types supported by <em>cats</em> library.</p> </div> <div class="sect2"> <h3 id="_maybe">5.1. Maybe</h3> <div class="paragraph"> -<p>This is one of the two most used monad types (commonly named Optional in non-functional programming +<p>This is one of the two most used monad types (also named Optional in other programming languages).</p> </div> <div class="paragraph"> @@ -1123,7 +1122,7 @@ <h3 id="_maybe">5.1. Maybe</h3> <div class="listingblock"> <div class="title">Usage example of <strong>Maybe</strong> constructors.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Just [1]></span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> @@ -1146,7 +1145,7 @@ <h3 id="_maybe">5.1. Maybe</h3> <div class="sect2"> <h3 id="_either">5.2. Either</h3> <div class="paragraph"> -<p>Either is another type that represents a result of computation, but in contrast with maybe +<p>Either is another type that represents a result of computation, but (in contrast with maybe) it can return some data with a failed computation result.</p> </div> <div class="paragraph"> @@ -1165,7 +1164,7 @@ <h3 id="_either">5.2. Either</h3> <div class="listingblock"> <div class="title">Usage example of <strong>Either</strong> constructors.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Right [:valid-value :right]></span> @@ -1193,20 +1192,20 @@ <h3 id="_try">5.3. Try</h3> <p>Also called Exception.</p> </div> <div class="paragraph"> -<p>The <code>Try</code> type represents a computation that may either result in an exception, +<p>The <code>Try</code> type represents a computation that may either result in an exception or return a successfully computed value. It’s similar to, but semantically -different from the <code>Either</code> type.</p> +different from, the <code>Either</code> type.</p> </div> <div class="paragraph"> -<p>It’s an analogue for the try-catch block: it replaces try-catch’s stack based error -handling with heap based error handling. Instead of having an exception thrown and +<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error +handling with heap-based error handling. Instead of having an exception thrown and having to deal with it immediately in the same thread, it disconnects the error handling and recovery.</p> </div> <div class="listingblock"> <div class="title">Usage example of <strong>try-on</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [1]></span> @@ -1216,22 +1215,22 @@ <h3 id="_try">5.3. Try</h3> </div> </div> <div class="paragraph"> -<p>For make it more powerfull, <em>cats</em> comes with other sugar syntax macros: <code>try-or-else</code> that -returns a default value if a computation fails and <code>try-or-recover</code> that make the -facility of handle yourself the return value executing a function with the exception as +<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that +returns a default value if a computation fails, and <code>try-or-recover</code> that lets +you handle the return value when executing a function with the exception as first parameter.</p> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-else</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [2]></span></code></pre> </div> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-recover</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">cond</span> <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> @@ -1255,18 +1254,18 @@ <h3 id="_try">5.3. Try</h3> <div class="sect2"> <h3 id="_state">5.4. State</h3> <div class="paragraph"> -<p>State monad in one of the special use cases of monads most used in haskell. It has different -purposes including: lazy computation composition and maintaining state without explicit state.</p> +<p>State monad in one of the special cases of monads most used in Haskell. It has different +purposes including: lazy computation, composition, and maintaining state without explicit state.</p> </div> <div class="paragraph"> -<p>The de facto monadic type of the state monad is a plain function. Function represents a computation +<p>The de-facto monadic type of the state monad is a plain function. Function represents a computation as is (without executing it). Obviously, a function should have some special characteristics to work in monad state composition.</p> </div> <div class="listingblock"> <div class="title">Valid function for valid state monad</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> <span class="tok-s">"Takes state as argument and return a vector</span> <span class="tok-s"> with first argument with procesed value and</span> <span class="tok-s"> second argument the transformed new state."</span> @@ -1276,8 +1275,8 @@ <h3 id="_state">5.4. State</h3> </div> </div> <div class="paragraph"> -<p>Right, you just saw an example of the low level primitive of state monad but for basic usage -you do not need to build your own functions, just use some helpers that <em>cats</em> gives you.</p> +<p>You just saw an example of the low-level primitive state monad. For basic usage +you do not need to build your own functions, just use some helpers that <em>cats</em> provides.</p> </div> <div class="paragraph"> <p>Let’s look at one example before explaining the details:</p> @@ -1285,21 +1284,22 @@ <h3 id="_state">5.4. State</h3> <div class="listingblock"> <div class="title">Lazy composition of computations</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> <span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> </div> </div> <div class="paragraph"> -<p>At the moment of evaluating the previous expression, anything that we have defined -is executed. Instead of the finished value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p> +<p>At the moment of evaluation in the previous expression, anything that we have defined +is executed. But instead of returning the unadorned final value of the computation, +a strange/unknown object is returned of type <strong>State</strong>.</p> </div> <div class="paragraph"> -<p>State is a simple wrapper for clojure functions, nothing more.</p> +<p>State is simply a wrapper for Clojure functions, nothing more.</p> </div> <div class="paragraph"> -<p>Now, it time to execute the composed computation, for this we can use one of the following +<p>Now, it’s time to execute the composed computation. For this we can use one of the following functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> </div> <div class="ulist"> @@ -1321,7 +1321,7 @@ <h3 id="_state">5.4. State</h3> <div class="listingblock"> <div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> <span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> 1</span> @@ -1336,7 +1336,7 @@ <h3 id="_state">5.4. State</h3> <div class="title">Note</div> </td> <td class="content"> -the pair instance returned by <code>run-state</code> functions works like any other seq of clojure, with +the pair instance returned by <code>run-state</code> function works like any other seq in Clojure, with the difference that pairs can only have two slots. </td> </tr> @@ -1400,7 +1400,7 @@ <h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are th </li> <li> <p>Fluokitten is the best library that we found, but the future of it is uncertain. One big -difference with fluokitten is that <code>cats</code> doesn’t aim to extend every clojure type +difference with fluokitten is that <code>cats</code> doesn’t aim to extend every Clojure type with monadic protocols, for the obvious reason that monad; functor and applicative represents context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> </li> @@ -1412,14 +1412,14 @@ <h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are th </div> </div> <div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What clojure types implements some of the Category Theory abstractions?</h3> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</h3> <div class="paragraph"> -<p>In contrast to other similar libraries in clojure, <em>cats</em> doesn’t intend to extend clojure types -that don’t act like containers. For example, clojure keywords are values but can not be containers so +<p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types +that don’t act like containers. For example, Clojure keywords are values but can not be containers so they should not extend any of the previously explained protocols.</p> </div> <table class="tableblock frame-all grid-all spread"> -<caption class="title">Table 1. Summary of clojure types and implemented protocols</caption> +<caption class="title">Table 1. Summary of Clojure types and implemented protocols</caption> <colgroup> <col style="width: 50%;"> <col style="width: 50%;"> @@ -1482,9 +1482,8 @@ <h3 id="_philosophy">7.1. Philosophy</h3> <div class="sect2"> <h3 id="_procedure">7.2. Procedure</h3> <div class="paragraph"> -<p><em>cats</em> unlike Clojure and other Clojure contrib libs, does not have many -restrictions for contributions. Just follow the following steps depending on the -situation:</p> +<p><em>cats</em> does not have many restrictions for contributions. Just follow these +steps depending on the situation:</p> </div> <div class="paragraph"> <p><strong>Bugfix</strong>:</p> @@ -1553,7 +1552,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2014-10-26 13:40:18 CET +Last updated 2014-10-30 13:44:23 CET </div> </div> </body> From 8ccc8ed2513ccc1b79c7f4a7d263dff44e91784d Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 8 Feb 2015 14:49:45 +0100 Subject: [PATCH 28/52] Update dev doc --- codox/css/default.css | 50 +++++++++++++++----------- codox/index.html | 2 +- index.html | 83 ++++++++++++++++++++++++------------------- 3 files changed, 78 insertions(+), 57 deletions(-) diff --git a/codox/css/default.css b/codox/css/default.css index 81cb803..fcabf4e 100644 --- a/codox/css/default.css +++ b/codox/css/default.css @@ -218,9 +218,10 @@ h2 { } .public { - padding-top: 12px; - margin-top: 15px; - margin-bottom: 28px; + margin: 0; + border-top: 1px solid #e0e0e0; + padding-top: 14px; + padding-bottom: 6px; } .public:last-child { @@ -244,9 +245,9 @@ h2 { .members .inner { padding-top: 5px; - padding-left: 15px; + padding-left: 12px; margin-top: 2px; - margin-left: 4px; + margin-left: 7px; border-left: 1px solid #bbb; } @@ -255,26 +256,34 @@ h2 { } .members .public { + border-top: none; margin-top: 0; - margin-bottom: 1em; padding-top: 6px; + padding-bottom: 0; } .members .public:first-child { padding-top: 0; } +h4.type, +h4.dynamic, +h4.added, +h4.deprecated { + float: left; + margin: 3px 10px 15px 0; + font-size: 15px; + font-weight: bold; + font-variant: small-caps; +} + .public h4.type, .public h4.dynamic, .public h4.added, .public h4.deprecated { - margin: 0; - float: left; - font-variant: small-caps; font-size: 13px; font-weight: bold; - margin-top: 3px; - margin-left: 10px; + margin: 3px 0 0 10px; } .members h4.type, @@ -349,6 +358,11 @@ p { } .doc { + margin: 0 0 26px 0; + clear: both; +} + +.public .doc { margin: 0; } @@ -365,19 +379,11 @@ p { font-size: 14px; } -.markdown, .namespace .index { +.doc, .public, .namespace .index { max-width: 680px; overflow-x: visible; } -.namespace-docs .markdown { - padding-bottom: 15px; -} - -.markdown p:last-child { - margin-bottom: 0; -} - .markdown code, .src-link a { background: #f6f6f6; border: 1px solid #e4e4e4; @@ -437,6 +443,10 @@ p { cursor: help; } +.src-link { + margin-bottom: 15px; +} + .src-link a { font-size: 70%; padding: 1px 4px; diff --git a/codox/index.html b/codox/index.html index d87c7c5..0536df7 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 10d2003..1f2b6a1 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,14 @@ <meta charset="UTF-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.1"> +<meta name="generator" content="Asciidoctor 1.5.2"> <meta name="author" content="Andrey Antukh & Alejandro Gómez"> <title>Cats Documentation</title> -<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400"> +<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400"> <style> /* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ /* Remove the comments around the @import statement below when using this as a custom stylesheet */ -/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Noto+Serif:400,400italic,700,700italic|Droid+Sans+Mono:400";*/ +/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} audio,canvas,video{display:inline-block} audio:not([controls]){display:none;height:0} @@ -275,8 +275,8 @@ ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} -ul.checklist li>p:first-child>.fa-check-square-o:first-child,ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em} -ul.checklist li>p:first-child>input[type="checkbox"]:first-child{position:relative;top:1px} +ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} +ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} ul.inline>li>*{display:block} @@ -480,7 +480,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.2.0</span> +<span id="revdate">0.3.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -515,8 +515,7 @@ <h1>Cats Documentation</h1> <li><a href="#_reader">5.5. Reader</a></li> <li><a href="#_writer">5.6. Writer</a></li> <li><a href="#_continuation">5.7. Continuation</a></li> -<li><a href="#_lazy">5.8. Lazy</a></li> -<li><a href="#_vector">5.9. Vector</a></li> +<li><a href="#_vector">5.8. Vector</a></li> </ul> </li> <li><a href="#_faq">6. FAQ</a> @@ -598,7 +597,7 @@ <h3 id="_leiningen">3.1. Leiningen</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.2.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.0"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> @@ -623,7 +622,7 @@ <h3 id="_maven">3.2. Maven</h3> <pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.2.0<span class="tok-nt"></version></span> + <span class="tok-nt"><version></span>0.3.0<span class="tok-nt"></version></span> <span class="tok-nt"></dependency></span></code></pre> </div> </div> @@ -631,14 +630,14 @@ <h3 id="_maven">3.2. Maven</h3> <div class="sect2"> <h3 id="_get_the_code">3.3. Get the Code</h3> <div class="paragraph"> -<p><em>cats</em> is open source and is entirely developed on <a href="https://github.com/niwibe/cats">github</a>.</p> +<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> </div> <div class="paragraph"> <p>You can clone the public repository with this command:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/niwibe/cats</code></pre> +<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> </div> </div> </div> @@ -675,7 +674,7 @@ <h3 id="_functor">4.1. Functor</h3> parameter.</p> </div> <div class="paragraph"> -<p>But, what is the <strong>*functor context</strong>? It sounds more complex than it is. A Functor +<p>But, what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> </div> <div class="listingblock"> @@ -690,19 +689,37 @@ <h3 id="_functor">4.1. Functor</h3> </div> </div> <div class="paragraph"> -<p>Let see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> +<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> </div> <div class="listingblock"> <div class="title">Example using fmap over <strong>just</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just [2]></span></code></pre> </div> </div> <div class="paragraph"> -<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absense of a value. +<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to +extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">from-maybe</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 1</span> +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span> +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absence of a value. It is a safe substitute for <code>nil</code> and may represent failure.</p> </div> <div class="paragraph"> @@ -732,17 +749,17 @@ <h3 id="_functor">4.1. Functor</h3> </div> <div class="paragraph"> <p>The main difference compared to the previous example with Clojure’s map function, is that -map works with seqs and doesn’t respect the input container:</p> +map returns lazy seqs no matter what collection we pass to it:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => (2 3 4)</span></code></pre> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> </div> </div> <div class="paragraph"> -<p>But why does the fmap version "work" with vectors? Because some Clojure container types like vectors, -lists, and sets also implement the functor abstraction.</p> +<p>But why can we pass vectors to fmap? Because some Clojure container types like vectors, +lists and sets also implement the functor abstraction.</p> </div> </div> <div class="sect2"> @@ -779,7 +796,7 @@ <h3 id="_applicative">4.2. Applicative</h3> evaluation of some computation in a context.</p> </div> <div class="paragraph"> -<p>Let’s see an exaple to better understand the differences between functor and +<p>Let’s see an example to better understand the differences between functor and applicative functor:</p> </div> <div class="paragraph"> @@ -831,8 +848,8 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> </div> <div class="paragraph"> -<p>Moreover the applicative functor comes with <strong>pure</strong> function, and main purpose of this function is -put some value in side-effect-free context of the current type.</p> +<p>Moreover, the applicative functor comes with <strong>pure</strong> function, and the main purpose of this function is +to put some value in side-effect-free context of the current type.</p> </div> <div class="paragraph"> <p>Examples:</p> @@ -925,7 +942,7 @@ <h3 id="_monad">4.3. Monad</h3> <div class="title">Previous example but using <strong>mlet</strong> macro.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))]</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> @@ -948,7 +965,7 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">b</span><span class="tok-p">))</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> @@ -1370,13 +1387,7 @@ <h3 id="_continuation">5.7. Continuation</h3> </div> </div> <div class="sect2"> -<h3 id="_lazy">5.8. Lazy</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_vector">5.9. Vector</h3> +<h3 id="_vector">5.8. Vector</h3> <div class="paragraph"> <p>TODO</p> </div> @@ -1519,8 +1530,8 @@ <h3 id="_procedure">7.2. Procedure</h3> <h3 id="_license">7.3. License</h3> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014, Andrey Antukh -Copyright (c) 2014, Alejandro Gómez +<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> +Copyright (c) 2014-2015 Alejandro Gómez All rights reserved. @@ -1552,7 +1563,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2014-10-30 13:44:23 CET +Last updated 2015-02-08 14:49:35 CET </div> </div> </body> From 033d4a1c4c146ff041c2ba5096cddf7cad4a3f7e Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 21 Feb 2015 11:53:12 +0100 Subject: [PATCH 29/52] Update dev doc --- codox/cats.builtin.html | 2 +- codox/cats.core.html | 4 ++-- codox/cats.data.html | 2 +- codox/cats.monad.continuation.html | 2 +- codox/cats.monad.either.html | 2 +- codox/cats.monad.exception.html | 2 +- codox/cats.monad.html | 2 +- codox/cats.monad.identity.html | 2 +- codox/cats.monad.maybe.html | 8 ++++++-- codox/cats.monad.reader.html | 2 +- codox/cats.protocols.html | 2 +- codox/index.html | 2 +- index.html | 8 ++++---- 13 files changed, 22 insertions(+), 18 deletions(-) diff --git a/codox/cats.builtin.html b/codox/cats.builtin.html index f39b785..ab4b89c 100644 --- a/codox/cats.builtin.html +++ b/codox/cats.builtin.html @@ -1,3 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. </pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.core.html b/codox/cats.core.html index 2052637..baacdf6 100644 --- a/codox/cats.core.html +++ b/codox/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure </pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. @@ -12,7 +12,7 @@ (>>= (just 1) (comp just inc) (comp just inc)) ;=> #<Just [3]> </pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside +applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside av's context, applies the function to value and return a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, returning the identity element when the predicate yields false. diff --git a/codox/cats.data.html b/codox/cats.data.html index cddafca..e3bef65 100644 --- a/codox/cats.data.html +++ b/codox/cats.data.html @@ -1,4 +1,4 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. </pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. </pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.continuation.html b/codox/cats.monad.continuation.html index 8f7333d..8c256ed 100644 --- a/codox/cats.monad.continuation.html +++ b/codox/cats.monad.continuation.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. </pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. </pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. </pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the diff --git a/codox/cats.monad.either.html b/codox/cats.monad.either.html index 309956e..6d0e383 100644 --- a/codox/cats.monad.either.html +++ b/codox/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. </pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. </pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. </pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. diff --git a/codox/cats.monad.exception.html b/codox/cats.monad.exception.html index ca2748b..3827a77 100644 --- a/codox/cats.monad.exception.html +++ b/codox/cats.monad.exception.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. The Try type represents a computation that may either result in an exception, or return a successfully computed value. It's similar to, but semantically diff --git a/codox/cats.monad.html b/codox/cats.monad.html index 3e87e49..764a00f 100644 --- a/codox/cats.monad.html +++ b/codox/cats.monad.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.identity.html b/codox/cats.monad.identity.html index d49b81e..7e4ab49 100644 --- a/codox/cats.monad.identity.html +++ b/codox/cats.monad.identity.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. </pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. </pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. </pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.maybe.html b/codox/cats.monad.maybe.html index a2cdfe7..4493acc 100644 --- a/codox/cats.monad.maybe.html +++ b/codox/cats.monad.maybe.html @@ -1,12 +1,16 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. </pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. </pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. Examples: (from-maybe (just 1)) ;=> 1 + (from-maybe (just 1) 42) + ;=> 1 (from-maybe (nothing)) ;=> nil + (from-maybe (nothing) 42) + ;=> 42 </pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.reader.html b/codox/cats.monad.reader.html index a03d233..66f6e31 100644 --- a/codox/cats.monad.reader.html +++ b/codox/cats.monad.reader.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. </pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. </pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function to Reader class instance. diff --git a/codox/cats.protocols.html b/codox/cats.protocols.html index c7a8799..c6e28a5 100644 --- a/codox/cats.protocols.html +++ b/codox/cats.protocols.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. </pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. diff --git a/codox/index.html b/codox/index.html index 0536df7..7590f6f 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index 1f2b6a1..fea9ad7 100644 --- a/index.html +++ b/index.html @@ -480,7 +480,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.3.0</span> +<span id="revdate">0.3.2</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -597,7 +597,7 @@ <h3 id="_leiningen">3.1. Leiningen</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.2"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> @@ -622,7 +622,7 @@ <h3 id="_maven">3.2. Maven</h3> <pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.3.0<span class="tok-nt"></version></span> + <span class="tok-nt"><version></span>0.3.2<span class="tok-nt"></version></span> <span class="tok-nt"></dependency></span></code></pre> </div> </div> @@ -1563,7 +1563,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-02-08 14:49:35 CET +Last updated 2015-02-21 11:52:42 CET </div> </div> </body> From 9e6b636672a19bf142a0e4393883f148d2183678 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 21 Feb 2015 11:55:03 +0100 Subject: [PATCH 30/52] Update dev doc --- codox/index.html | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codox/index.html b/codox/index.html index 7590f6f..0536df7 100644 --- a/codox/index.html +++ b/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></div></body></html> \ No newline at end of file diff --git a/index.html b/index.html index fea9ad7..282aa22 100644 --- a/index.html +++ b/index.html @@ -1563,7 +1563,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-02-21 11:52:42 CET +Last updated 2015-02-21 11:53:38 CET </div> </div> </body> From 06f02fc5ae4b51ca2e1b0f9d9eee4c3de4513346 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 21 Feb 2015 12:03:32 +0100 Subject: [PATCH 31/52] Update latest doc --- latest/codox/cats.builtin.html | 3 + latest/codox/cats.core.html | 140 ++ latest/codox/cats.data.html | 4 + latest/codox/cats.monad.continuation.html | 6 + latest/codox/cats.monad.either.html | 8 + latest/codox/cats.monad.exception.html | 14 + latest/codox/cats.monad.html | 2 + latest/codox/cats.monad.identity.html | 5 + latest/codox/cats.monad.lazy.html | 3 + latest/codox/cats.monad.maybe.html | 16 + latest/codox/cats.monad.reader.html | 10 + latest/codox/cats.monad.state.html | 31 + latest/codox/cats.monad.writer.html | 3 + latest/codox/cats.protocols.html | 28 + latest/codox/css/default.css | 455 ++++++ latest/codox/index.html | 2 + latest/codox/js/jquery.min.js | 4 + latest/codox/js/page_effects.js | 99 ++ latest/index.html | 1570 +++++++++++++++++++++ latest/logo.png | Bin 0 -> 5208 bytes 20 files changed, 2403 insertions(+) create mode 100644 latest/codox/cats.builtin.html create mode 100644 latest/codox/cats.core.html create mode 100644 latest/codox/cats.data.html create mode 100644 latest/codox/cats.monad.continuation.html create mode 100644 latest/codox/cats.monad.either.html create mode 100644 latest/codox/cats.monad.exception.html create mode 100644 latest/codox/cats.monad.html create mode 100644 latest/codox/cats.monad.identity.html create mode 100644 latest/codox/cats.monad.lazy.html create mode 100644 latest/codox/cats.monad.maybe.html create mode 100644 latest/codox/cats.monad.reader.html create mode 100644 latest/codox/cats.monad.state.html create mode 100644 latest/codox/cats.monad.writer.html create mode 100644 latest/codox/cats.protocols.html create mode 100644 latest/codox/css/default.css create mode 100644 latest/codox/index.html create mode 100644 latest/codox/js/jquery.min.js create mode 100644 latest/codox/js/page_effects.js create mode 100644 latest/index.html create mode 100644 latest/logo.png diff --git a/latest/codox/cats.builtin.html b/latest/codox/cats.builtin.html new file mode 100644 index 0000000..95647fe --- /dev/null +++ b/latest/codox/cats.builtin.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.core.html b/latest/codox/cats.core.html new file mode 100644 index 0000000..b20081d --- /dev/null +++ b/latest/codox/cats.core.html @@ -0,0 +1,140 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. +</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. +Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the +arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. +</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, +ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. + +Example: + (>>= (just 1) (comp just inc) (comp just inc)) + ;=> #<Just [3]> +</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, +applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside +av's context, applies the function to value and return +a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, +returning the identity element when the predicate yields false. + +Otherwise, returns the instance unchanged. + + (require '[cats.monad.moaybe :as maybe]) + (require '[cats.core :as m]) + + (m/filter (partial < 2) (maybe/just 3)) + ;=> <Just [3]> + + (m/filter (partial < 4) (maybe/just 3)) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. + +(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(m/forseq [2 3] maybe/just) +;=> <Just [[2 3]]> + +(m/forseq [1 2] + (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing)))) +;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value +of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a +monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (def monad+ (m/lift-m 2 +)) + + (monad+ (maybe/just 1) (maybe/just 2)) + ;=> <Just [3]> + + (monad+ (maybe/just 1) (maybe/nothing)) + ;=> <Nothing> + + (monad+ [0 2 4] [1 2]) + ;=> [1 2 3 4 5 6] +</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a +monadic context, map it into the given collection +calling sequence on the results. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/mapseq maybe/just [2 3]) + ;=> <Just [[2 3]]> + + (m/mapseq (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing))) + [1 2]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure +let. This allows much easy composition of monadic +computations. + +Let see one example for understand how it works, this is +a code using bind for compose few number of operations: + + + (bind (just 1) + (fn [a] + (bind (just (inc a)) + (fn [b] + (return (* b 2)))))) + ;=> #<Just [4]> + +Now see how this code can be more clear if you +are using mlet macro for do it: + + (mlet [a (just 1) + b (just (inc a))] + (return (* b 2))) + ;=> #<Just [4]> +</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the +same as mlet but specifying the monadic context. +So, instead of writing: + + (with-monad (maybe-transformer vector-monad) + (mlet [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2)))) + ;=> [#<Just [4]> #<Just [6]>] + +You can just write: + + (mlet-with (maybe-transformer vector-monad) + [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2))) + ;=> [#<Just [4]> #<Just [6]>] +</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +default/effect free context. + +This is multiarity function that with arity pure/1 +it uses the dynamic scope to resolve the current +context. With pure/2, you can force a specific context +value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect +their values in a vector returned in the monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/sequence [(maybe/just 2) (maybe/just 3)]) + ;=> <Just [[2, 3]]> + + (m/sequence [(maybe/nothing) (maybe/just 3)]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.data.html b/latest/codox/cats.data.html new file mode 100644 index 0000000..2fc8cd8 --- /dev/null +++ b/latest/codox/cats.data.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. +</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.continuation.html b/latest/codox/cats.monad.continuation.html new file mode 100644 index 0000000..ea0bf80 --- /dev/null +++ b/latest/codox/cats.monad.continuation.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. +</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.either.html b/latest/codox/cats.monad.either.html new file mode 100644 index 0000000..2390823 --- /dev/null +++ b/latest/codox/cats.monad.either.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. +</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. +</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.exception.html b/latest/codox/cats.monad.exception.html new file mode 100644 index 0000000..ba99e6a --- /dev/null +++ b/latest/codox/cats.monad.exception.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. + +The Try type represents a computation that may either result in an exception, +or return a successfully computed value. It's similar to, but semantically +different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. +</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. +</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. +</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. + +Is a high order function that accept a function +as parameter and returns an other that returns +success or failure depending of result of the +first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.html b/latest/codox/cats.monad.html new file mode 100644 index 0000000..b83623b --- /dev/null +++ b/latest/codox/cats.monad.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.identity.html b/latest/codox/cats.monad.identity.html new file mode 100644 index 0000000..567ade2 --- /dev/null +++ b/latest/codox/cats.monad.identity.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. +</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. +</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.lazy.html b/latest/codox/cats.monad.lazy.html new file mode 100644 index 0000000..b16e01b --- /dev/null +++ b/latest/codox/cats.monad.lazy.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. +</pre></div><div class="public anchor" id="var-lazy-monad"><h3>lazy-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lazy-transformer"><h3>lazy-transformer</h3><div class="usage"><code>(lazy-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.maybe.html b/latest/codox/cats.monad.maybe.html new file mode 100644 index 0000000..dd4e766 --- /dev/null +++ b/latest/codox/cats.monad.maybe.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. +</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. + +Examples: + (from-maybe (just 1)) + ;=> 1 + (from-maybe (just 1) 42) + ;=> 1 + (from-maybe (nothing)) + ;=> nil + (from-maybe (nothing) 42) + ;=> 42 +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.reader.html b/latest/codox/cats.monad.reader.html new file mode 100644 index 0000000..efaf977 --- /dev/null +++ b/latest/codox/cats.monad.reader.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. +</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function +to Reader class instance. +Reader class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the +wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.state.html b/latest/codox/cats.monad.state.html new file mode 100644 index 0000000..8ad8993 --- /dev/null +++ b/latest/codox/cats.monad.state.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. +</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +value, ignoring the state. +Equivalent to taking the first value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +state. +Equivalent to taking the second value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns +the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces +the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and returns a cats.data.Pair +instance with result and new state. + + (def computation (mlet [x (get-state) + y (put-state (inc x))] + (return y))) + + (def initial-state 1) + (run-state computation initial-state) + +This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function +to State class instance. +State class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the +specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.writer.html b/latest/codox/cats.monad.writer.html new file mode 100644 index 0000000..43b8805 --- /dev/null +++ b/latest/codox/cats.monad.writer.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. +</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.protocols.html b/latest/codox/cats.protocols.html new file mode 100644 index 0000000..6b8e7a0 --- /dev/null +++ b/latest/codox/cats.protocols.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) +inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts +the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. +</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. +</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. +</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state +and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. +</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. +</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. +</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. +</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, +yield a writer which has the first element of the pair as the value and +the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. +</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/css/default.css b/latest/codox/css/default.css new file mode 100644 index 0000000..fcabf4e --- /dev/null +++ b/latest/codox/css/default.css @@ -0,0 +1,455 @@ +body { + font-family: Helvetica, Arial, sans-serif; + font-size: 15px; +} + +pre, code { + font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; + font-size: 9pt; + margin: 15px 0; +} + +h2 { + font-weight: normal; + font-size: 28px; + padding: 10px 0 2px 0; + margin: 0; +} + +#header, #content, .sidebar { + position: fixed; +} + +#header { + top: 0; + left: 0; + right: 0; + height: 20px; + background: #444; + color: #fff; + padding: 5px 7px; +} + +#content { + top: 30px; + right: 0; + bottom: 0; + overflow: auto; + background: #fff; + color: #333; + padding: 0 18px; +} + +.sidebar { + position: fixed; + top: 30px; + bottom: 0; + overflow: auto; +} + +#namespaces { + background: #e2e2e2; + border-right: solid 1px #cccccc; + left: 0; + width: 250px; +} + +#vars { + background: #f2f2f2; + border-right: solid 1px #cccccc; + left: 251px; + width: 200px; +} + +.namespace-index { + left: 251px; +} + +.namespace-docs { + left: 452px; +} + +#header { + background: -moz-linear-gradient(top, #555 0%, #222 100%); + background: -webkit-linear-gradient(top, #555 0%, #333 100%); + background: -o-linear-gradient(top, #555 0%, #222 100%); + background: -ms-linear-gradient(top, #555 0%, #222 100%); + background: linear-gradient(top, #555 0%, #222 100%); + box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); + z-index: 100; +} + +#header h1 { + margin: 0; + padding: 0; + font-size: 12pt; + font-weight: lighter; + text-shadow: -1px -1px 0px #333; +} + +#header a, .sidebar a { + display: block; + text-decoration: none; +} + +#header a { + color: #fff; +} + +.sidebar a { + color: #333; +} + +#header h2 { + float: right; + font-size: 9pt; + font-weight: normal; + margin: 3px 3px; + padding: 0; + color: #bbb; +} + +#header h2 a { + display: inline; +} + +.sidebar h3 { + margin: 0; + padding: 10px 10px 0 10px; + font-size: 19px; + font-weight: normal; +} + +.sidebar ul { + padding: 0.5em 0em; + margin: 0; +} + +.sidebar li { + display: block; + vertical-align: middle; +} + +.sidebar li a, .sidebar li .no-link { + border-left: 3px solid transparent; + padding: 0 7px; + white-space: nowrap; +} + +.sidebar li .no-link { + display: block; + color: #777; + font-style: italic; +} + +.sidebar li .inner { + display: inline-block; + padding-top: 7px; + height: 24px; +} + +.sidebar li a, .sidebar li .tree { + height: 31px; +} + +.depth-1 .inner { padding-left: 2px; } +.depth-2 .inner { padding-left: 6px; } +.depth-3 .inner { padding-left: 20px; } +.depth-4 .inner { padding-left: 34px; } +.depth-5 .inner { padding-left: 48px; } +.depth-6 .inner { padding-left: 62px; } + +.sidebar li .tree { + display: block; + float: left; + position: relative; + top: -10px; + margin: 0 4px 0 0; + padding: 0; +} + +.sidebar li.depth-1 .tree { + display: none; +} + +.sidebar li .tree .top, .sidebar li .tree .bottom { + display: block; + margin: 0; + padding: 0; + width: 7px; +} + +.sidebar li .tree .top { + border-left: 1px solid #aaa; + border-bottom: 1px solid #aaa; + height: 19px; +} + +.sidebar li .tree .bottom { + height: 22px; +} + +.sidebar li.branch .tree .bottom { + border-left: 1px solid #aaa; +} + +#namespaces li.current a { + border-left: 3px solid #a33; + color: #a33; +} + +#vars li.current a { + border-left: 3px solid #33a; + color: #33a; +} + +#content h3 { + font-size: 13pt; + font-weight: bold; +} + +.public h3 { + margin: 0; + float: left; +} + +.usage { + clear: both; +} + +.public { + margin: 0; + border-top: 1px solid #e0e0e0; + padding-top: 14px; + padding-bottom: 6px; +} + +.public:last-child { + margin-bottom: 20%; +} + +.members .public:last-child { + margin-bottom: 0; +} + +.members { + margin: 15px 0; +} + +.members h4 { + color: #555; + font-weight: normal; + font-variant: small-caps; + margin: 0 0 5px 0; +} + +.members .inner { + padding-top: 5px; + padding-left: 12px; + margin-top: 2px; + margin-left: 7px; + border-left: 1px solid #bbb; +} + +#content .members .inner h3 { + font-size: 12pt; +} + +.members .public { + border-top: none; + margin-top: 0; + padding-top: 6px; + padding-bottom: 0; +} + +.members .public:first-child { + padding-top: 0; +} + +h4.type, +h4.dynamic, +h4.added, +h4.deprecated { + float: left; + margin: 3px 10px 15px 0; + font-size: 15px; + font-weight: bold; + font-variant: small-caps; +} + +.public h4.type, +.public h4.dynamic, +.public h4.added, +.public h4.deprecated { + font-size: 13px; + font-weight: bold; + margin: 3px 0 0 10px; +} + +.members h4.type, +.members h4.added, +.members h4.deprecated { + margin-top: 1px; +} + +h4.type { + color: #717171; +} + +h4.dynamic { + color: #9933aa; +} + +h4.added { + color: #508820; +} + +h4.deprecated { + color: #880000; +} + +.namespace { + margin-bottom: 30px; +} + +.namespace:last-child { + margin-bottom: 10%; +} + +.index { + padding: 0; + font-size: 80%; + margin: 15px 0; + line-height: 16px; +} + +.index * { + display: inline; +} + +.index p { + padding-right: 3px; +} + +.index li { + padding-right: 5px; +} + +.index ul { + padding-left: 0; +} + +.usage code { + display: block; + color: #008; + margin: 2px 0; +} + +.usage code:first-child { + padding-top: 10px; +} + +p { + margin: 15px 0; +} + +.public p:first-child, .public pre.plaintext { + margin-top: 12px; +} + +.doc { + margin: 0 0 26px 0; + clear: both; +} + +.public .doc { + margin: 0; +} + +.namespace-index .doc { + margin-bottom: 20px; +} + +.namespace-index .namespace .doc { + margin-bottom: 10px; +} + +.markdown { + line-height: 18px; + font-size: 14px; +} + +.doc, .public, .namespace .index { + max-width: 680px; + overflow-x: visible; +} + +.markdown code, .src-link a { + background: #f6f6f6; + border: 1px solid #e4e4e4; + border-radius: 2px; +} + +.markdown pre { + background: #f4f4f4; + border: 1px solid #e0e0e0; + border-radius: 2px; + padding: 5px 10px; + margin: 0 10px; +} + +.markdown pre code { + background: transparent; + border: none; +} + +.doc ul, .doc ol { + padding-left: 30px; +} + +.doc table { + border-collapse: collapse; + margin: 0 10px; +} + +.doc table td, .doc table th { + border: 1px solid #dddddd; + padding: 4px 6px; +} + +.doc table th { + background: #f2f2f2; +} + +.doc dl { + margin: 0 10px 20px 10px; +} + +.doc dl dt { + font-weight: bold; + margin: 0; + padding: 3px 0; + border-bottom: 1px solid #ddd; +} + +.doc dl dd { + padding: 5px 0; + margin: 0 0 5px 10px; +} + +.doc abbr { + border-bottom: 1px dotted #333; + font-variant: none + cursor: help; +} + +.src-link { + margin-bottom: 15px; +} + +.src-link a { + font-size: 70%; + padding: 1px 4px; + text-decoration: none; + color: #5555bb; +} \ No newline at end of file diff --git a/latest/codox/index.html b/latest/codox/index.html new file mode 100644 index 0000000..9e70cca --- /dev/null +++ b/latest/codox/index.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/js/jquery.min.js b/latest/codox/js/jquery.min.js new file mode 100644 index 0000000..73f33fb --- /dev/null +++ b/latest/codox/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/latest/codox/js/page_effects.js b/latest/codox/js/page_effects.js new file mode 100644 index 0000000..ef8120d --- /dev/null +++ b/latest/codox/js/page_effects.js @@ -0,0 +1,99 @@ +function visibleInParent(element) { + var position = $(element).position().top + return position > -50 && position < ($(element).offsetParent().height() - 50) +} + +function hasFragment(link, fragment) { + return $(link).attr("href").indexOf("#" + fragment) != -1 +} + +function findLinkByFragment(elements, fragment) { + return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() +} + +function scrollToCurrentVarLink(elements) { + var elements = $(elements); + var parent = elements.offsetParent(); + + if (elements.length == 0) return; + + var top = elements.first().position().top; + var bottom = elements.last().position().top + elements.last().height(); + + if (top >= 0 && bottom <= parent.height()) return; + + if (top < 0) { + parent.scrollTop(parent.scrollTop() + top); + } + else if (bottom > parent.height()) { + parent.scrollTop(parent.scrollTop() + bottom - parent.height()); + } +} + +function setCurrentVarLink() { + $('#vars a').parent().removeClass('current') + $('.anchor'). + filter(function(index) { return visibleInParent(this) }). + each(function(index, element) { + findLinkByFragment("#vars a", element.id). + parent(). + addClass('current') + }); + scrollToCurrentVarLink('#vars .current'); +} + +var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) + +function scrollPositionId(element) { + var directory = window.location.href.replace(/[^\/]+\.html$/, '') + return 'scroll::' + $(element).attr('id') + '::' + directory +} + +function storeScrollPosition(element) { + if (!hasStorage) return; + localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) + localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) +} + +function recallScrollPosition(element) { + if (!hasStorage) return; + $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) + $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) +} + +function persistScrollPosition(element) { + recallScrollPosition(element) + $(element).scroll(function() { storeScrollPosition(element) }) +} + +function sidebarContentWidth(element) { + var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) + return Math.max.apply(Math, widths) +} + +function resizeSidebars() { + var nsWidth = sidebarContentWidth('#namespaces') + 30 + var varWidth = 0 + + if ($('#vars').length != 0) { + varWidth = sidebarContentWidth('#vars') + 30 + } + + // snap to grid + var snap = 30; + nsWidth = Math.ceil(nsWidth / snap) * snap; + varWidth = Math.ceil(varWidth / snap) * snap; + + $('#namespaces').css('width', nsWidth) + $('#vars').css('width', varWidth) + $('#vars, .namespace-index').css('left', nsWidth + 1) + $('.namespace-docs').css('left', nsWidth + varWidth + 2) +} + +$(window).ready(resizeSidebars) +$(window).ready(setCurrentVarLink) +$(window).ready(function() { persistScrollPosition('#namespaces')}) +$(window).ready(function() { + $('#content').scroll(setCurrentVarLink) + $(window).resize(setCurrentVarLink) +}) diff --git a/latest/index.html b/latest/index.html new file mode 100644 index 0000000..171708c --- /dev/null +++ b/latest/index.html @@ -0,0 +1,1570 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="UTF-8"> +<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<meta name="generator" content="Asciidoctor 1.5.2"> +<meta name="author" content="Andrey Antukh & Alejandro Gómez"> +<title>Cats Documentation</title> +<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400"> +<style> +/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ +/* Remove the comments around the @import statement below when using this as a custom stylesheet */ +/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/ +article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} +audio,canvas,video{display:inline-block} +audio:not([controls]){display:none;height:0} +[hidden],template{display:none} +script{display:none!important} +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} +body{margin:0} +a{background:transparent} +a:focus{outline:thin dotted} +a:active,a:hover{outline:0} +h1{font-size:2em;margin:.67em 0} +abbr[title]{border-bottom:1px dotted} +b,strong{font-weight:bold} +dfn{font-style:italic} +hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} +mark{background:#ff0;color:#000} +code,kbd,pre,samp{font-family:monospace;font-size:1em} +pre{white-space:pre-wrap} +q{quotes:"\201C" "\201D" "\2018" "\2019"} +small{font-size:80%} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sup{top:-.5em} +sub{bottom:-.25em} +img{border:0} +svg:not(:root){overflow:hidden} +figure{margin:0} +fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} +legend{border:0;padding:0} +button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} +button,input{line-height:normal} +button,select{text-transform:none} +button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} +button[disabled],html input[disabled]{cursor:default} +input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} +input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} +input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} +textarea{overflow:auto;vertical-align:top} +table{border-collapse:collapse;border-spacing:0} +*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} +html,body{font-size:100%} +body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} +a:hover{cursor:pointer} +img,object,embed{max-width:100%;height:auto} +object,embed{height:100%} +img{-ms-interpolation-mode:bicubic} +#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} +.left{float:left!important} +.right{float:right!important} +.text-left{text-align:left!important} +.text-right{text-align:right!important} +.text-center{text-align:center!important} +.text-justify{text-align:justify!important} +.hide{display:none} +.antialiased,body{-webkit-font-smoothing:antialiased} +img{display:inline-block;vertical-align:middle} +textarea{height:auto;min-height:50px} +select{width:100%} +p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} +.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} +div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} +a{color:#2156a5;text-decoration:underline;line-height:inherit} +a:hover,a:focus{color:#1d4b8f} +a img{border:none} +p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} +p aside{font-size:.875em;line-height:1.35;font-style:italic} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} +h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} +h1{font-size:2.125em} +h2{font-size:1.6875em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} +h4,h5{font-size:1.125em} +h6{font-size:1em} +hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} +em,i{font-style:italic;line-height:inherit} +strong,b{font-weight:bold;line-height:inherit} +small{font-size:60%;line-height:inherit} +code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} +ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} +ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} +ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} +ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} +ul.square{list-style-type:square} +ul.circle{list-style-type:circle} +ul.disc{list-style-type:disc} +ul.no-bullet{list-style:none} +ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} +dl dt{margin-bottom:.3125em;font-weight:bold} +dl dd{margin-bottom:1.25em} +abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} +abbr{text-transform:none} +blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} +blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} +blockquote cite:before{content:"\2014 \0020"} +blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} +blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} +@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} +h1{font-size:2.75em} +h2{font-size:2.3125em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} +h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} +table thead,table tfoot{background:#f7f8f7;font-weight:bold} +table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} +table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} +table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} +table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} +h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} +.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} +.clearfix:after,.float-group:after{clear:both} +*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} +pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} +.keyseq{color:rgba(51,51,51,.8)} +kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} +.keyseq kbd:first-child{margin-left:0} +.keyseq kbd:last-child{margin-right:0} +.menuseq,.menu{color:rgba(0,0,0,.8)} +b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} +b.button:before{content:"[";padding:0 3px 0 2px} +b.button:after{content:"]";padding:0 2px 0 3px} +p a>code:hover{color:rgba(0,0,0,.9)} +#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} +#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} +#header:after,#content:after,#footnotes:after,#footer:after{clear:both} +#content{margin-top:1.25em} +#content:before{content:none} +#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} +#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} +#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} +#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} +#header .details span:first-child{margin-left:-.125em} +#header .details span.email a{color:rgba(0,0,0,.85)} +#header .details br{display:none} +#header .details br+span:before{content:"\00a0\2013\00a0"} +#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} +#header .details br+span#revremark:before{content:"\00a0|\00a0"} +#header #revnumber{text-transform:capitalize} +#header #revnumber:after{content:"\00a0"} +#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} +#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} +#toc>ul{margin-left:.125em} +#toc ul.sectlevel0>li>a{font-style:italic} +#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} +#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} +#toc a{text-decoration:none} +#toc a:active{text-decoration:underline} +#toctitle{color:#7a2518;font-size:1.2em} +@media only screen and (min-width:768px){#toctitle{font-size:1.375em} +body.toc2{padding-left:15em;padding-right:0} +#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} +#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} +#toc.toc2>ul{font-size:.9em;margin-bottom:0} +#toc.toc2 ul ul{margin-left:0;padding-left:1em} +#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} +body.toc2.toc-right{padding-left:0;padding-right:15em} +body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} +#toc.toc2{width:20em} +#toc.toc2 #toctitle{font-size:1.375em} +#toc.toc2>ul{font-size:.95em} +#toc.toc2 ul ul{padding-left:1.25em} +body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +#content #toc>:first-child{margin-top:0} +#content #toc>:last-child{margin-bottom:0} +#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} +#footer-text{color:rgba(255,255,255,.8);line-height:1.44} +.sect1{padding-bottom:.625em} +@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} +#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} +#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} +#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} +#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} +#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} +.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} +.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} +table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} +.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} +table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} +.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} +.admonitionblock>table td.icon{text-align:center;width:80px} +.admonitionblock>table td.icon img{max-width:none} +.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} +.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} +.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} +.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} +.exampleblock>.content>:first-child{margin-top:0} +.exampleblock>.content>:last-child{margin-bottom:0} +.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +.sidebarblock>:first-child{margin-top:0} +.sidebarblock>:last-child{margin-bottom:0} +.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} +.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} +.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} +.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} +.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} +.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} +@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} +.listingblock pre.highlightjs{padding:0} +.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} +.listingblock pre.prettyprint{border-width:0} +.listingblock>.content{position:relative} +.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} +.listingblock:hover code[data-lang]:before{display:block} +.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} +.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} +table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} +table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} +table.pyhltable td.code{padding-left:.75em;padding-right:0} +pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} +pre.pygments .lineno{display:inline-block;margin-right:.25em} +table.pyhltable .linenodiv{background:none!important;padding-right:0!important} +.quoteblock{margin:0 1em 1.25em 1.5em;display:table} +.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} +.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} +.quoteblock blockquote{margin:0;padding:0;border:0} +.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} +.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} +.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} +.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} +.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} +.quoteblock .quoteblock blockquote:before{display:none} +.verseblock{margin:0 1em 1.25em 1em} +.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} +.verseblock pre strong{font-weight:400} +.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} +.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} +.quoteblock .attribution br,.verseblock .attribution br{display:none} +.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} +.quoteblock.abstract{margin:0 0 1.25em 0;display:block} +.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} +.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} +table.tableblock{max-width:100%;border-collapse:separate} +table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} +table.spread{width:100%} +table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} +table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} +table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} +table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} +table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} +table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} +table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} +table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} +table.frame-all{border-width:1px} +table.frame-sides{border-width:0 1px} +table.frame-topbot{border-width:1px 0} +th.halign-left,td.halign-left{text-align:left} +th.halign-right,td.halign-right{text-align:right} +th.halign-center,td.halign-center{text-align:center} +th.valign-top,td.valign-top{vertical-align:top} +th.valign-bottom,td.valign-bottom{vertical-align:bottom} +th.valign-middle,td.valign-middle{vertical-align:middle} +table thead th,table tfoot th{font-weight:bold} +tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} +tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} +p.tableblock>code:only-child{background:none;padding:0} +p.tableblock{font-size:1em} +td>div.verse{white-space:pre} +ol{margin-left:1.75em} +ul li ol{margin-left:1.5em} +dl dd{margin-left:1.125em} +dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} +ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} +ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} +ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} +ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} +ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} +ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} +ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} +ul.inline>li>*{display:block} +.unstyled dl dt{font-weight:400;font-style:normal} +ol.arabic{list-style-type:decimal} +ol.decimal{list-style-type:decimal-leading-zero} +ol.loweralpha{list-style-type:lower-alpha} +ol.upperalpha{list-style-type:upper-alpha} +ol.lowerroman{list-style-type:lower-roman} +ol.upperroman{list-style-type:upper-roman} +ol.lowergreek{list-style-type:lower-greek} +.hdlist>table,.colist>table{border:0;background:none} +.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} +td.hdlist1{padding-right:.75em;font-weight:bold} +td.hdlist1,td.hdlist2{vertical-align:top} +.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} +.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} +.colist>table tr>td:last-of-type{padding:.25em 0} +.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} +.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} +.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} +.imageblock>.title{margin-bottom:0} +.imageblock.thumb,.imageblock.th{border-width:6px} +.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} +.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} +.image.left{margin-right:.625em} +.image.right{margin-left:.625em} +a.image{text-decoration:none} +span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} +span.footnote a,span.footnoteref a{text-decoration:none} +span.footnote a:active,span.footnoteref a:active{text-decoration:underline} +#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} +#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} +#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} +#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} +#footnotes .footnote:last-of-type{margin-bottom:0} +#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} +.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} +.gist .file-data>table td.line-data{width:99%} +div.unbreakable{page-break-inside:avoid} +.big{font-size:larger} +.small{font-size:smaller} +.underline{text-decoration:underline} +.overline{text-decoration:overline} +.line-through{text-decoration:line-through} +.aqua{color:#00bfbf} +.aqua-background{background-color:#00fafa} +.black{color:#000} +.black-background{background-color:#000} +.blue{color:#0000bf} +.blue-background{background-color:#0000fa} +.fuchsia{color:#bf00bf} +.fuchsia-background{background-color:#fa00fa} +.gray{color:#606060} +.gray-background{background-color:#7d7d7d} +.green{color:#006000} +.green-background{background-color:#007d00} +.lime{color:#00bf00} +.lime-background{background-color:#00fa00} +.maroon{color:#600000} +.maroon-background{background-color:#7d0000} +.navy{color:#000060} +.navy-background{background-color:#00007d} +.olive{color:#606000} +.olive-background{background-color:#7d7d00} +.purple{color:#600060} +.purple-background{background-color:#7d007d} +.red{color:#bf0000} +.red-background{background-color:#fa0000} +.silver{color:#909090} +.silver-background{background-color:#bcbcbc} +.teal{color:#006060} +.teal-background{background-color:#007d7d} +.white{color:#bfbfbf} +.white-background{background-color:#fafafa} +.yellow{color:#bfbf00} +.yellow-background{background-color:#fafa00} +span.icon>.fa{cursor:default} +.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} +.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} +.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} +.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} +.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} +.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} +.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} +.conum[data-value] *{color:#fff!important} +.conum[data-value]+b{display:none} +.conum[data-value]:after{content:attr(data-value)} +pre .conum[data-value]{position:relative;top:-.125em} +b.conum *{color:inherit!important} +.conum:not([data-value]):empty{display:none} +h1,h2{letter-spacing:-.01em} +dt,th.tableblock,td.content{text-rendering:optimizeLegibility} +p,td.content{letter-spacing:-.01em} +p strong,td.content strong{letter-spacing:-.005em} +p,blockquote,dt,td.content{font-size:1.0625rem} +p{margin-bottom:1.25rem} +.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} +.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} +.print-only{display:none!important} +@media print{@page{margin:1.25cm .75cm} +*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} +a{color:inherit!important;text-decoration:underline!important} +a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} +a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} +abbr[title]:after{content:" (" attr(title) ")"} +pre,blockquote,tr,img{page-break-inside:avoid} +thead{display:table-header-group} +img{max-width:100%!important} +p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} +h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} +#toc,.sidebarblock,.exampleblock>.content{background:none!important} +#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} +.sect1{padding-bottom:0!important} +.sect1+.sect1{border:0!important} +#header>h1:first-child{margin-top:1.25rem} +body.book #header{text-align:center} +body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} +body.book #header .details{border:0!important;display:block;padding:0!important} +body.book #header .details span:first-child{margin-left:0!important} +body.book #header .details br{display:block} +body.book #header .details br+span:before{content:none!important} +body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} +body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} +.listingblock code[data-lang]:before{display:block} +#footer{background:none!important;padding:0 .9375em} +#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} +.hide-on-print{display:none!important} +.print-only{display:block!important} +.hide-for-print{display:none!important} +.show-for-print{display:inherit!important}} +</style> +<style> +.listingblock .pygments .hll { background-color: #ffffcc } +.listingblock .pygments { background: #f0f0f0; } +.listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ +.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ +.listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ +.listingblock .pygments .tok-o { color: #666666 } /* Operator */ +.listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ +.listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ +.listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ +.listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ +.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ +.listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ +.listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ +.listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ +.listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ +.listingblock .pygments .tok-gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ +.listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ +.listingblock .pygments .tok-kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.listingblock .pygments .tok-kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.listingblock .pygments .tok-kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.listingblock .pygments .tok-kp { color: #007020 } /* Keyword.Pseudo */ +.listingblock .pygments .tok-kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.listingblock .pygments .tok-kt { color: #902000 } /* Keyword.Type */ +.listingblock .pygments .tok-m { color: #40a070 } /* Literal.Number */ +.listingblock .pygments .tok-s { color: #4070a0 } /* Literal.String */ +.listingblock .pygments .tok-na { color: #4070a0 } /* Name.Attribute */ +.listingblock .pygments .tok-nb { color: #007020 } /* Name.Builtin */ +.listingblock .pygments .tok-nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.listingblock .pygments .tok-no { color: #60add5 } /* Name.Constant */ +.listingblock .pygments .tok-nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.listingblock .pygments .tok-ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.listingblock .pygments .tok-ne { color: #007020 } /* Name.Exception */ +.listingblock .pygments .tok-nf { color: #06287e } /* Name.Function */ +.listingblock .pygments .tok-nl { color: #002070; font-weight: bold } /* Name.Label */ +.listingblock .pygments .tok-nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.listingblock .pygments .tok-nt { color: #062873; font-weight: bold } /* Name.Tag */ +.listingblock .pygments .tok-nv { color: #bb60d5 } /* Name.Variable */ +.listingblock .pygments .tok-ow { color: #007020; font-weight: bold } /* Operator.Word */ +.listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ +.listingblock .pygments .tok-mb { color: #40a070 } /* Literal.Number.Bin */ +.listingblock .pygments .tok-mf { color: #40a070 } /* Literal.Number.Float */ +.listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ +.listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ +.listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ +.listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ +.listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ +.listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ +.listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.listingblock .pygments .tok-sh { color: #4070a0 } /* Literal.String.Heredoc */ +.listingblock .pygments .tok-si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.listingblock .pygments .tok-sx { color: #c65d09 } /* Literal.String.Other */ +.listingblock .pygments .tok-sr { color: #235388 } /* Literal.String.Regex */ +.listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ +.listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ +.listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ +.listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ +.listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ +.listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ +.listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ +</style> +</head> +<body class="article toc2 toc-left"> +<div id="header"> +<h1>Cats Documentation</h1> +<div class="details"> +<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> +<span id="revdate">0.3.2</span> +</div> +<div id="toc" class="toc2"> +<div id="toctitle">Table of Contents</div> +<ul class="sectlevel1"> +<li><a href="#_introduction">1. Introduction</a> +<ul class="sectlevel2"> +<li><a href="#_why_another_library">1.1. Why another library?</a></li> +</ul> +</li> +<li><a href="#_project_maturity">2. Project Maturity</a></li> +<li><a href="#_install">3. Install</a> +<ul class="sectlevel2"> +<li><a href="#_leiningen">3.1. Leiningen</a></li> +<li><a href="#_maven">3.2. Maven</a></li> +<li><a href="#_get_the_code">3.3. Get the Code</a></li> +</ul> +</li> +<li><a href="#_user_guide">4. User Guide</a> +<ul class="sectlevel2"> +<li><a href="#_functor">4.1. Functor</a></li> +<li><a href="#_applicative">4.2. Applicative</a></li> +<li><a href="#_monad">4.3. Monad</a></li> +<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> +</ul> +</li> +<li><a href="#_monad_types">5. Monad types</a> +<ul class="sectlevel2"> +<li><a href="#_maybe">5.1. Maybe</a></li> +<li><a href="#_either">5.2. Either</a></li> +<li><a href="#_try">5.3. Try</a></li> +<li><a href="#_state">5.4. State</a></li> +<li><a href="#_reader">5.5. Reader</a></li> +<li><a href="#_writer">5.6. Writer</a></li> +<li><a href="#_continuation">5.7. Continuation</a></li> +<li><a href="#_vector">5.8. Vector</a></li> +</ul> +</li> +<li><a href="#_faq">6. FAQ</a> +<ul class="sectlevel2"> +<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</a></li> +</ul> +</li> +<li><a href="#_how_to_contribute">7. How to Contribute?</a> +<ul class="sectlevel2"> +<li><a href="#_philosophy">7.1. Philosophy</a></li> +<li><a href="#_procedure">7.2. Procedure</a></li> +<li><a href="#_license">7.3. License</a></li> +</ul> +</li> +</ul> +</div> +</div> +<div id="content"> +<div id="preamble"> +<div class="sectionbody"> +<div class="paragraph"> +<p><span class="image"><img src="logo.png" alt="cats logo"></span></p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_introduction">1. Introduction</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>Category Theory abstractions for Clojure.</p> +</div> +<div class="sect2"> +<h3 id="_why_another_library">1.1. Why another library?</h3> +<div class="paragraph"> +<p>Because the cats library:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>targets both of the most-used Clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> +</li> +<li> +<p>aims to have the simplest implementation of the supported abstractions.</p> +</li> +<li> +<p>aims to have more abstractions that are simple monads.</p> +</li> +<li> +<p>has documentation as first class citizen.</p> +</li> +<li> +<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> +</li> +</ul> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_project_maturity">2. Project Maturity</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>Since <em>cats</em> is a young project, there can be some <a href="codox/index.html#id">API</a> breakage.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_install">3. Install</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section covers installing <em>cats</em>.</p> +</div> +<div class="sect2"> +<h3 id="_leiningen">3.1. Leiningen</h3> +<div class="paragraph"> +<p>The simplest way to use <em>cats</em> in a Clojure project is by including +it as a dependency in your <strong><em>project.clj</em></strong>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.2"</span><span class="tok-p">]</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_maven">3.2. Maven</h3> +<div class="paragraph"> +<p>Also, you can use it with Maven. First, add the Clojars repository:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> + <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> + <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> +<span class="tok-nt"></repository></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Then for cats:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> + <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> + <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> + <span class="tok-nt"><version></span>0.3.2<span class="tok-nt"></version></span> +<span class="tok-nt"></dependency></span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_get_the_code">3.3. Get the Code</h3> +<div class="paragraph"> +<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> +</div> +<div class="paragraph"> +<p>You can clone the public repository with this command:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_user_guide">4. User Guide</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section introduces almost all the category theory abstractions that the <em>cats</em> library +supports.</p> +</div> +<div class="paragraph"> +<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all +the abstractions and it is very easy to understand. You can read more about it in the next +section of the documentation.</p> +</div> +<div class="sect2"> +<h3 id="_functor">4.1. Functor</h3> +<div class="paragraph"> +<p>Let’s start with the functor. The Functor represents some sort of "computational context", and the +abstraction consists of one unique function: <strong>fmap</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Signature of <strong>fmap</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The higher-order function <strong>fmap</strong> takes a plain function as the first parameter and +value wrapped in a functor context as the second parameter. It extracts the inner value +applies the function to it, and returns the result wrapped in same type as the second +parameter.</p> +</div> +<div class="paragraph"> +<p>But, what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor +wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> +</div> +<div class="listingblock"> +<div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-c1">;; `just` function is one of two constructors of Maybe</span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmap over <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to +extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">from-maybe</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 1</span> +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span> +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absence of a value. +It is a safe substitute for <code>nil</code> and may represent failure.</p> +</div> +<div class="paragraph"> +<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> instance:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmap over <strong>nothing</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Oh, awesome, instead of raising a <code>NullPointerException</code>, it just returns <strong>nothing</strong>. Another +advantage of using the functor abstraction, is that it always returns a result +of the same type as its second argument.</p> +</div> +<div class="paragraph"> +<p>Let’s see an example of applying fmap over a Clojure vector:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmav over <strong>vector</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 3 4]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The main difference compared to the previous example with Clojure’s map function, is that +map returns lazy seqs no matter what collection we pass to it:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>But why can we pass vectors to fmap? Because some Clojure container types like vectors, +lists and sets also implement the functor abstraction.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_applicative">4.2. Applicative</h3> +<div class="paragraph"> +<p>Let’s continue with applicative functors. The Applicative Functor represents +some sort of "computational context" like a plain Functor, but with abilty to +execute a function wrapped in the same context.</p> +</div> +<div class="paragraph"> +<p>The Applicative Functor abstraction consists of two functions: <strong>fapply</strong> and +<strong>pure</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Signature of <strong>fapply</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +the <strong>pure</strong> function will be explained later. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>The use case for Applicative Functors is much the same as plain Functors: safe +evaluation of some computation in a context.</p> +</div> +<div class="paragraph"> +<p>Let’s see an example to better understand the differences between functor and +applicative functor:</p> +</div> +<div class="paragraph"> +<p>Imagine you have some factory function that, depending on the language, returns a +greeter function, and you only support a few languages.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-nv">nil</span><span class="tok-p">))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, before using the resulting greeter you should always defensively check if returned +greeter is a valid function or is a nil value.</p> +</div> +<div class="paragraph"> +<p>Let’s convert this factory to use Maybe type:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can see, this version of the factory differs only slightly from the +original implementation. And this tiny change gives you a new superpower: you +can apply the returned greeter to any value without a defensive nil check:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hola Alex]></span> + +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hello Alex]></span> + +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Moreover, the applicative functor comes with <strong>pure</strong> function, and the main purpose of this function is +to put some value in side-effect-free context of the current type.</p> +</div> +<div class="paragraph"> +<p>Examples:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [5]></span> + +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>If you do not understand the purpose of the <strong>pure</strong> function, the next section +should clarify its purpose.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_monad">4.3. Monad</h3> +<div class="paragraph"> +<p>Monads are the most discussed programming concept to come from category theory. Like functors and +applicatives, monads deal with data in contexts.</p> +</div> +<div class="paragraph"> +<p>Additionaly, monads can also transform contexts by unwrapping data, applying functions to it and +putting new values in a completely different context.</p> +</div> +<div class="paragraph"> +<p>The monad abstraction consists of two functions: <strong>bind</strong> and <strong>return</strong></p> +</div> +<div class="listingblock"> +<div class="title">Bind function signature.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can see, bind works much like a Functor but with inverted arguments. The main difference is +that in a monad, the function is a responsible for wrapping a returned value in a context.</p> +</div> +<div class="listingblock"> +<div class="title">Example usage of the bind higher-order function.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>One of the key features of the bind function is that any computation executed within the context of +bind (monad) knows the context type implicitly. With this, if you apply some computation over some +monadic value and you want to return the result in the same container context but don’t know +what that container is, you can use <code>return</code> or <code>pure</code> functions:</p> +</div> +<div class="listingblock"> +<div class="title">Usage of return function in bind context.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context +value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> +</div> +<div class="paragraph"> +<p>We now can compose any number of computations using monad <strong>*bind</strong> +functions. But observe what happens when the number of computations increases:</p> +</div> +<div class="listingblock"> +<div class="title">Composability example of bind function.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>This can quickly lead to callback hell. To solve this, <em>cats</em> comes with a powerful +macro: <strong>mlet</strong></p> +</div> +<div class="listingblock"> +<div class="title">Previous example but using <strong>mlet</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +If you are coming from Haskell, mlet represents the <strong>do-syntax</strong>. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>If you want to use regular (non-monadic) let bindings inside an <code>mlet</code> block, you can do so using +<code>:let</code> and a binding vector inside the mlet bindings:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_monad_transformers">4.4. Monad Transformers</h3> +<div class="sect3"> +<h4 id="_motivation">4.4.1. Motivation</h4> +<div class="paragraph"> +<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, +we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> + <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> + +<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> +<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> +<span class="tok-c1">; contain a value of any type.</span> +<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> +<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>However, monads don’t compose as nicely as functors do. We have to actually implement +the composition ourselves.</p> +</div> +<div class="paragraph"> +<p>In some circumstances we would like combine the effects of two monads into another one. We call the +resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A +monad transformer is itself a monad.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> +<div class="paragraph"> +<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer +using State as the base monad since we want the resulting type to be a stateful computation +that may fail: <code>s -> Maybe (a, s)</code>.</p> +</div> +<div class="paragraph"> +<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with +any other monad. The transformer functions take a Monad as their argument and they +return a reified MonadTrans:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> + +<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful +function that yields a Maybe containing a pair (value, next state).</p> +</div> +<div class="paragraph"> +<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. +When working with monad transformers, we have to be explicit about what monad we are using to implement +the binding policy since there is no way to distinguish values from a transformer type from those of +a regular monad.</p> +</div> +<div class="paragraph"> +<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> +</div> +<div class="paragraph"> +<p>Let’s see it in action:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> + <span class="tok-s">"A function that takes an input string as an state and</span> +<span class="tok-s"> consumes one character yielding it as a the value. The</span> +<span class="tok-s"> new state is the input string with the character consumed.</span> + +<span class="tok-s"> It fails when there isn't a character to consume."</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">Clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Nothing ></span> + +<span class="tok-c1">; We could have written `any-two-chars` more succinctly by using `cats.core/mlet-with`,</span> +<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> + +<span class="tok-c1">; We also define a function for applying parser to a given input</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_monad_types">5. Monad types</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>In our examples we have seen two types that implement +the monad abstraction: Maybe and Either. But these are only two of the types +that implements the Monad abstraction. In this section, we will explain the different +monad types supported by <em>cats</em> library.</p> +</div> +<div class="sect2"> +<h3 id="_maybe">5.1. Maybe</h3> +<div class="paragraph"> +<p>This is one of the two most used monad types (also named Optional in other programming +languages).</p> +</div> +<div class="paragraph"> +<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is +used as the return type of functions which may or may not return a meaningful value when they +are applied. It consists of either an empty constructor (called None or Nothing), or a constructor +encapsulating the original data type A (written Just A or Some A).</p> +</div> +<div class="paragraph"> +<p><em>cats</em>, implements two constructors:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>(just v)</code>: represents just a value in a context.</p> +</li> +<li> +<p><code>(nothing)</code>: represents a failure or null.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [1]></span> +<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Maybe types are: Functors, Applicative Functors and Monads +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_either">5.2. Either</h3> +<div class="paragraph"> +<p>Either is another type that represents a result of computation, but (in contrast with maybe) +it can return some data with a failed computation result.</p> +</div> +<div class="paragraph"> +<p>In <em>cats</em> it has two constructors:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>(left v)</code>: represents a failure.</p> +</li> +<li> +<p><code>(right v)</code>: represents a successful result.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>Either</strong> constructors.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Right [:valid-value :right]></span> + +<span class="tok-p">(</span><span class="tok-nb">left </span><span class="tok-s">"Error message"</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [Error message :left]></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Either is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_try">5.3. Try</h3> +<div class="paragraph"> +<p>Also called Exception.</p> +</div> +<div class="paragraph"> +<p>The <code>Try</code> type represents a computation that may either result in an exception +or return a successfully computed value. It’s similar to, but semantically +different from, the <code>Either</code> type.</p> +</div> +<div class="paragraph"> +<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error +handling with heap-based error handling. Instead of having an exception thrown and +having to deal with it immediately in the same thread, it disconnects the error +handling and recovery.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>try-on</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [1]></span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Failure [#<NullPointerException java.lang.NullPointerException>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that +returns a default value if a computation fails, and <code>try-or-recover</code> that lets +you handle the return value when executing a function with the exception as +first parameter.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-else</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [2]></span></code></pre> +</div> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-recover</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">cond</span> + <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> + <span class="tok-ss">:else</span> <span class="tok-mi">100</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Success [0]></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Try is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_state">5.4. State</h3> +<div class="paragraph"> +<p>State monad in one of the special cases of monads most used in Haskell. It has different +purposes including: lazy computation, composition, and maintaining state without explicit state.</p> +</div> +<div class="paragraph"> +<p>The de-facto monadic type of the state monad is a plain function. Function represents a computation +as is (without executing it). Obviously, a function should have some special characteristics to work +in monad state composition.</p> +</div> +<div class="listingblock"> +<div class="title">Valid function for valid state monad</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> + <span class="tok-s">"Takes state as argument and return a vector</span> +<span class="tok-s"> with first argument with procesed value and</span> +<span class="tok-s"> second argument the transformed new state."</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> + <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> + <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>You just saw an example of the low-level primitive state monad. For basic usage +you do not need to build your own functions, just use some helpers that <em>cats</em> provides.</p> +</div> +<div class="paragraph"> +<p>Let’s look at one example before explaining the details:</p> +</div> +<div class="listingblock"> +<div class="title">Lazy composition of computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> + <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> +<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>At the moment of evaluation in the previous expression, anything that we have defined +is executed. But instead of returning the unadorned final value of the computation, +a strange/unknown object is returned of type <strong>State</strong>.</p> +</div> +<div class="paragraph"> +<p>State is simply a wrapper for Clojure functions, nothing more.</p> +</div> +<div class="paragraph"> +<p>Now, it’s time to execute the composed computation. For this we can use one of the following +functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>run-state</code> function executes the composed computation and returns both the value and the +result state.</p> +</li> +<li> +<p><code>eval-state</code> function executes the composed computation and returns the resulting value +discarding the state.</p> +</li> +<li> +<p><code>exec-state</code> function executes the composed computation and return only the resulting +state, ignoring the resulting value.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> +<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> 1</span> +<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> (2 3)</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +the pair instance returned by <code>run-state</code> function works like any other seq in Clojure, with +the difference that pairs can only have two slots. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them +seems out of the scope of this document.</p> +</div> +<div class="paragraph"> +<p>However, if you have better examples to explain the state monad, documentation for another monad or +any other contribution is always welcome.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_reader">5.5. Reader</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_writer">5.6. Writer</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_continuation">5.7. Continuation</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_vector">5.8. Vector</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_faq">6. FAQ</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> +<div class="paragraph"> +<p>This is an incomplete list of differences with other existing libraries:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling +is slighty limited (e.g. you always need to specify what monad you want use instead of +relying on the type). And obviously because it only has monads.</p> +</li> +<li> +<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big +difference with fluokitten is that <code>cats</code> doesn’t aim to extend every Clojure type +with monadic protocols, for the obvious reason that monad; functor and applicative represents +context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> +</li> +<li> +<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation +has much unnecesary complexity.</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</h3> +<div class="paragraph"> +<p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types +that don’t act like containers. For example, Clojure keywords are values but can not be containers so +they should not extend any of the previously explained protocols.</p> +</div> +<table class="tableblock frame-all grid-all spread"> +<caption class="title">Table 1. Summary of Clojure types and implemented protocols</caption> +<colgroup> +<col style="width: 50%;"> +<col style="width: 50%;"> +</colgroup> +<thead> +<tr> +<th class="tableblock halign-left valign-top">Name</th> +<th class="tableblock halign-left valign-top">Implemented protocols</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_how_to_contribute">7. How to Contribute?</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_philosophy">7.1. Philosophy</h3> +<div class="paragraph"> +<p>Five most important rules:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Beautiful is better than ugly.</p> +</li> +<li> +<p>Explicit is better than implicit.</p> +</li> +<li> +<p>Simple is better than complex.</p> +</li> +<li> +<p>Complex is better than complicated.</p> +</li> +<li> +<p>Readability counts.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>All contributions to <em>cats</em> should keep these important rules in mind.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_procedure">7.2. Procedure</h3> +<div class="paragraph"> +<p><em>cats</em> does not have many restrictions for contributions. Just follow these +steps depending on the situation:</p> +</div> +<div class="paragraph"> +<p><strong>Bugfix</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Fork the GitHub repo.</p> +</li> +<li> +<p>Fix a bug/typo on a new branch.</p> +</li> +<li> +<p>Make a pull-request to master.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p><strong>New feature</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Open new issue with the new feature proposal.</p> +</li> +<li> +<p>If it is accepted, follow the same steps as "bugfix".</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_license">7.3. License</h3> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> +Copyright (c) 2014-2015 Alejandro Gómez + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</code></pre> +</div> +</div> +</div> +</div> +</div> +</div> +<div id="footer"> +<div id="footer-text"> +Last updated 2015-02-21 11:57:07 CET +</div> +</div> +</body> +</html> \ No newline at end of file diff --git a/latest/logo.png b/latest/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9f1a8f949faea6d5a7768f1aa02b68a648f87979 GIT binary patch literal 5208 zcmV-e6sPNnP)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00004b3#c}2nYxW zd<bNS00009a7bBm000}W000}W0bUxB8~^|S8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H16V*vXK~#90?VWj?71fo;zlT+2iyH`tw8j{hpg0;gL{MVJjJufV zd_Y4qL1UuHn9R6FjWL=;qZ311Mx&z>HIul6pdUnn8r0~3F}NTqk!Euth=PcUG~D^) z+-Kh|>b+N0_tvXwyMLe0`E>QGyWdlHIrrRi#27;-Ixe~tU4Tv$i%tgU;OJz44vtO+ z=-}vNfDVp!&j2FQwZObZMA~&5w#&kcNEZ>AC?b=Aw?$-yh}<tCdp0Ql5h5}TcpF$Q zB6o?%*hb_X9LAV-ML=I*3SeUBBj947YfgFh1g-(rSIPfIpnK76l&Vfe7a(N^GyyMG zX?&L+2eu2G_h*4Q3G$u^Y*BPuec~7Z*aY}nf)1$A+rR|h(E#WUd=q#tMcxkrQgoYr z(iq^zn1-GLoC|!}etB`7F(3F^+M(Gp+_!<nRnmO`7z<noOpAGcLD6mYiD3X>T%>V7 z1Wt|#_Z7Pii0iO-fZthW*b&$?61NwyGjKXE8CYE<oz=h>WAgqMu+9nB0*orU?b<y9 z0Gk6VBb{(ejqu-1F;uSv769+2h%>%M-V-8W7XdwsZo~G@09Qok*9389r0CEzba$P6 z1$Z(N=etF>VJ#}P96&?{0B1QrwE+KCCr(#%xX%MCL`15+G|C0vK|8*J^F*X~PUZ1O z(HvOki@KJ!U(>Z!!gU1>0Db~2C7-XqLJNRPfW4@)(g$vj#JRBOwyfI5MHiq(=WmNH z_S}Zt%Xz;Qx;VT8Sdnw5SEDz8TY=+&eoooOM8d5EHZQtO<EUHRA)+`;L?v%7Mu^Br z;5c9e#f!4HK^J}#fEE#X1h^O2G7|2!Xhabif{t3ffj+=yz%#(3#+VQDD{=%yb6}OP zzZ>v6#eCJFX(2E;GO}F<tgRA$4RAloR9$j!>!Lfm3IiNhf{qJ8%Ye@~_4*+jPiwVk z7BIXcGQdM6=)4d##;H>p`GiX?z?I~6z*Tf-$8`RVz=jfZo-e)R)agj7pCBfs*d35B z6}^ax!$ee|(%x}1fQWQM&oO-4`b-fytA4O_5X+&ZfQa-&_wid5T^3KQLl=I_MdUc( zo<QktK*iuw0;N~F5nwFszw-eeH^wZt&!+`Uw+nEWi0l|L!7}0Wq6-iRA2`qZ1x~vc zaDJ%7O2YsmvMVq$L)1T`+r}Zl0ALV$jz1?{=>T{P_$tsJ6##7qoCN$eCagQJ=F!IE ztsu!CMX&mum2y<>pM*|u;`czMYTcdR&d!i#l-2<!*2(9bNSr@9@7@nkhTL`qr5OQ$ z6EeivTtr5R$Q`K4)@opxh)fcZt&K5P<2MJl0ADf2{8mJoMC2Cqq;WOyu87<uBKx9> zsxI7iUF?y6Eqq->`g^BR^p|hHl3fY^h0Fs6qn(lUuxOrBzSmO3TZ29PL65WZ7y%4$ z&L?FA7@b3!I|DCZwRE$lAtEz?+34CLDK-O6wa>SrBSs!L&^v{qzkd6b{Eqy-lA@>? zE4~FT$SIGveA~Vhf*=uDhOVv~jb*@ebY4FIRq_al<Bc)*0Eoz~=m}qF>|~6YpE-63 zzWy}x|C_)K=+-a9aq)gmIl2IIJ<?hXJPiB_WhjHLJ$AF{cSG+BgdPPp(vEI#Yk=KT zgdKn?Tbyf*8HAp#p9s8^G4Invq@UIEI|^Mlq`@3idby1;W;@_gU?}h@`+f`HArWaZ z#<bY54`wWDHSFXSy96UZMTs)Y7uO6d<Z#uLHmIh`-F1qn0jWGce2<32yN$vrGTw z)Ba^p39B{tuLYh(_3PiVv>N@wwz9M%dUqh}HSycf!<y63YhY>6f^H8NIOSUf^mEF$ z127DDQbZ;gW9|k{5s@XpMH$QN!fWkRb_Q4myn=o~)fiv{x<$)!h_n>A3K)o<L;N~r z{I_iR{!VoUXtC*U1N>e@{@oaJl`-aG5m^dcPj==7-^FtYrhq>Zeqoe^K0sIgBY~$; z9fT_zl=oRq{SPPI#nULg;?@2oV1TDmR(LLOIdBFlKAxVT(Wat9a}zqf7~lu!mv~;v z4!O^k<6FSb&=Da?yopX5jG?-cXgzwly)!_y+qY4A2{;s8^&SLVhTi;5(^yMT9sa(+ zDQtY_@E-J3aS-sE6zRTz-V#0lU6UMvPFuC&YyiIMw8M#HQ-yo3-7)|=>{h$Yn+Ls# z8kne;XEQplx8z)&^|U={{9cAMX8H6%p>hDDwZ6T9Sq=bpq5f*W3HUUAi?bvUVE@Y9 zL1WC%QDIUVto12Cp$uRJFjt`p9d8v`mI5#n*ax^1cveIz2Ue${cL$Qf?-o%3!~P(k zzkU8RI^1rJ?&W_$W2b~7=w;w&TmL3>t80Keoi;i*MSAzQn>7F`YF!EpwErJ(EAgE3 z+fZN<x=ky(vqI8xbf?hGVg3b?Fr)0dZm0k(NxC&{7L<kofZ@PDfaT6_KXNLv0NB-e zw+*_js%EOCz0e2fwe`ME-G-qzi=$y5aKaptF#S79&j7%lw4RVX=KOwFq%!XkG5>-d zs9b_t{VKXM(@--i>Kz=Z&;B*)vH|#<6ZX*r`CMOW2CyBt&?)fk&b$As(g>FjF}{Fa zq5co*@2`ub4^gK6LbUw04u?`-$n@V%_>l?n{6T3M0NrIwjTHEY&ih&?d4B-<R7rO@ zdeb)PJefB=i|YPWH4q7$OfqTTN3^|8Uhkspsbyw>i(?8r!TF-=HO4$(WSu;=N9_j9 z#Qy?jQffg(*q7p1EvZtzT}f}W>Pjd60d>NDsgw)={BxBK8D-z^k)lEV2UWVLm*>{N zc=W8`Zgh7MLN9+csu+4Bx^t;(?gbS$|D3kA1C!D!+M1mCYmKmb`1DgQI)Ngx9cu0* zYAOZPhVK#)ITkgik`(WvYlB}J)vife7C|+Kc5<jc`W3gJ9Ta_DhYF_Vq1U{Zq$npM zauT|O*(OcA2+lFa{LH2|5oNwOY-NmDkvW$fzWg4jWs5j&{RnIJgluwe13V8LOHKw8 zJnFp#s@?QL#(G8RHK2!0yEpO1EEjl}JBNn2u12NiJK-jIHqcUZjWIZM9a7X)(4*YD zNN4&bDSge!>xP*3x0Q+kfG^dl(Bn?ns0<)0twX1hL$Ok}6y+TP9EO!bCXCY^U6@@A zyqZI&yEK<p8xDKMy#IP>7yz}dU9Ul=JK-ni&|vQaPoQTC<5AIb+<ts?Oj+jvpN|RK z1Kp2bh$^3~$+^>`bc9ou=+yezGBLoV2`b~>n*CFQ8gLbGiIeXHs;|sH0FHFRUQT|u zdy~>kr#z=Rzb^~XZ$XZOMdUN6l&&6J!wH*($U6c0qMASz+r!sVT^V*0;3g5N-1c1t zY?^xsYh$Fnfei3lbTJ6(6~!B&^Z|aw##TM!;GSLg3Y2#e%&>pQp#rE{7=Z5e0UpV% zMCtH70AtJ=R8<YsV1+ll89+o%Ko?+1P{atZ&=|AOJ`YP6rxNaY^x&pw94#W7+vkev z`pggsdoh5B^Z~9;5yfSIMvVaO7oSvMQVG|M#xZIw^g!L>V2pVNxX=FehVKY)7U}NI z7r_8qipci%c~-(Wm2jU!*9B$3IOjQ-kHX9hAR?R4)|o@1XwLJ7ta)cZ#ZuS3sOPa- zcm&<<x$(+?kygZxv0H*5@Ywc!lk{7fTb%ew{Qrfbxme#l=vUobCESa^P#dlfZS@$+ zK<9?qwtL9|P<81nQn0B`8hQEksYX9>^6rgZEO`P|Q=5t24C?8Gi4(mRP0yEw0ltv2 z0&|=+?r3o1wV+d0O^1#sbDvLn4OV*{|ArC-9i1`WK<D|zjA>*=S5!niqnfEzYpn8d z;K!8LVD-5AL6RerK7fcULM>%x!BAt&Vi7qAHT6;ymZCZf^U*Vdf1)jemK96UHVm_f z&M^EB$8QKb*`~7z*>A*lbQ)3Q6mW2cI4(v57<G&^+cT|>iZP)Q%EABxJo9uJ==Yv! zbyOS@DxoY4;A_vnNkm52=Q~g}u|{J(s&X|8Ra<`=y{Xek;gk>d6Ok~dlo{3lArv`o zb<(>#Kzd2&CE%y1zrk32LR8!55OlZD+@Nx0r7>yyE{Gfe_)CDozXxn$)BBg48)`0a zc!qikYPBPJfwL_1<DwYg=|B}Y+@{x+e4IpnfQqZTq6bf3L<K>+rL1oc^tyHy{r)`Z z$)XtG)<6}w(MdDvY}uDy$LjZ?%9PEK_j5_9O^i+rMfoU>qjgldI+r&CoEfMBuhA-q zni#NQUaE91x?qhOf~wHNq;$=S-sxWysGK1v_0$%nEW3apiU_D4LB%@v6M@ov2UY5< zIBUKL-RazfP64|D-$w;d2cxcD62lntDr!@BO`!7n!hbuMVFc(!xJ#JF*)#_QNNXK% zNTjTbfWu<yFb3W7tp+yD&<4j)j>DqAHGB%N4G_w@=iWBGApz2w6vL?VYt&(yjdyIu zHn_6{46qhY593)GV4px0s2GbH;hD}VVCzU3ds5@#1o{;l9OFzW+h7OEah9>I4+CU6 z4mQTj!r#8%Tw}~X?6dD&c9m)M)CqtwX00*i<r;COpeJibSoOA4FvcuE*A_*i$tSXp zQs{S3m8q;a13q@He4<A>p!Ne&!5Fh1?Z7^$ErTp*q>;;NX!41inE{M3D^W|=D>FpD z-568RYd;%ZooB^!rd97hEf(3oU(OhRHoBcH5=~yQy;qSs7gn<e5J&f5tzV!v0evr9 zW)g{_SH>z5$W=J{fGN|dbsfGDbaTVk050rYI0Cq)PSCZ$nZ}s0#+X(1w@LV4yqK3U z-j8V20P2g%2^yJyC^UJ+_Wb&zrrdT%1ugfZQ^N}Td>*ii6Rr>8#J>k;DEFRhYzaKm zmxN9qMUDV}_v%AW2G|}oW424oyDm`%vA^#}Si=fCr7Uw7HnvZ=0-X+OY7AFNFNrO` zJjqKI;5!8fdNK4l5xH7KK31wU#%wT^VM3&<hzu8z%g|e`J9y^nVtvZ+6Hz%v1^<hB z@fwIKhUT4rX!Ic6^}M$5907J@V~$*kDvewOT!CJ-^6`mNj}A&v-u|?jtTpHYbO@@a zXn>0|w87XM>z0)E&)SE+Uc=%>kinLY@=QA^2B!#n6|GJk0j@A=vhEFZCvXI6fiw+# zOu>ah=6>{@0?OcdG?C{_5g84f<owi(G6Y8L4n73zB_e4U3Um}K8kwh|PXYrRUN3-% zbVv8=F3vWpnqI*J=$htVQ|8~Ok**dxGz07{BJ~zQ-$#7~RWRKc^M^>7spt{!_@o(& z$nJz)&}K!4W`K(FX8cQ$CiLcS1uf_~MjIGCn0gA>Lqra&lGffL;*JnO@9B9UvFY56 z;JFLfh2mGh1~oh1w@MkOM8aNEqdwoTVV)&MbsXK@TwtFE(s-MJ)hP3kurCAjpgc~V zu81k$F_AFKaIA30gzrnMUBIcd>K67v9Zi1h=MOdBTy&icj{W6^Gk|S~IVETWgQ|h= z<&>)z8+#?K>s$fd8C1e=KyMFM99X@Eo?RS7dDO&T_3FO>3~*Zs8lgf<uzm$lbM5ZC z*(CT<&^`5oF=?+s?IJW$+tW#-X@*b#g>WA~2X%*125bx5CnATVf*n_=bFWEor{1Vc z;4l#x1{?|Oi#mk91vMx0F#h)=Lt>#<>;NOc!4&@$MCk=!d*8Z6>bV>FTL;fVrx!g1 zY*B(nh@<6r`qOdhcp~u*8_GaC6v_a$fs(p_FM|F=9mh^J>NN_L4HR96YUH&5G$za% z0Ca&h#3TNCbS?21`laoR-Wu-hUo^%5vqj|3z<sEh)v7*#tO2QGQHR!{3`MR))#l!` z)C)KewMpzFOnb<;U_qQlWpDsh3ooFCBYuNw?u<oO-=C@#DJ2%61|i-=kB7HJPxS_& z3&{{z1>B4ZqMkrKnw^eLCy5TQ65tqP%w(?=0!;zki1&r-L+@aH=AZ(a%V{4DrPreR zkz3lb_aYz16AMY{A}6;sfUW4|IW_1sTFti(LFEo*xR)14Q3u!ulHbnZ+d=v*AOmbi zeqZQnU|%P%qbSF<ESLU*b3F|`rq08Ym_g+csV}wW$^f>~m*v>Ni?PFM37Oy-tjQZ& zwtaIh+Xcb;EHDG~LUjW3s`!IA;@pxj!8<rYCv-u%B**-k31Ar{7Y48mFfQi?KPQsk z`2{n;*hqP<&oQqS;DDh06`BETBm6qYMp%NQzmIMYR~OXzb0YQbn{!z%3f@;aF+fl9 zm7tA`<oAn$7+_qa9H-=%*JI@1FF6;LE@RAERFd{)9_gc!Iv4**<1c8ujb18ou}@sU z0C*8N!RVFtpvX<9&lvMMDobz9A^A29ZH#HA)z43(Fx_nI#y*sU&&5;di1&I9X$LzC zh=noc6%pAVy&$@Gz@+2O^{+!moPOxK!2R2gFm*Mk1nx!Dcw~}t`CuBl$jr?uS&*}U zx|xXdLM3=U?#`B=#;GO)j~ZjvWhg@&bM!_9HfyR7=t$WGc*_{`evLeOqK8jMqsk;% z9Z;-C4RW55ww`Ix5C-@-Gj+-G4OEGw)=5|kdRuo9s(~}v7*o&PTd5!-0(>52hS8{` zbRcTFHV%~&(HX!Ec3R6F4P}5f8LNZlp{U@bqGGiK6(qf3Lb*gK5k#abdg3?)J#}nB zucog+UEIFc@G=#}0G%iY%5bx%69uA^0XjH38K8rslL0z7IvJpYqmuzTIQ}1U+}%<$ S1(h=Z0000<MNUMnLSTX;hnoig literal 0 HcmV?d00001 From 2bbc6645b6f1ad9e883dbfefbe581070893b01e8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 21 Feb 2015 12:09:19 +0100 Subject: [PATCH 32/52] Update devel doc --- devel/codox/cats.builtin.html | 3 + devel/codox/cats.core.html | 140 ++ devel/codox/cats.data.html | 4 + devel/codox/cats.monad.continuation.html | 6 + devel/codox/cats.monad.either.html | 8 + devel/codox/cats.monad.exception.html | 14 + devel/codox/cats.monad.html | 2 + devel/codox/cats.monad.identity.html | 5 + devel/codox/cats.monad.maybe.html | 16 + devel/codox/cats.monad.reader.html | 10 + devel/codox/cats.monad.state.html | 31 + devel/codox/cats.monad.writer.html | 3 + devel/codox/cats.protocols.html | 28 + devel/codox/css/default.css | 455 +++++++ devel/codox/index.html | 2 + devel/codox/js/jquery.min.js | 4 + devel/codox/js/page_effects.js | 99 ++ devel/index.html | 1570 ++++++++++++++++++++++ devel/logo.png | Bin 0 -> 5208 bytes 19 files changed, 2400 insertions(+) create mode 100644 devel/codox/cats.builtin.html create mode 100644 devel/codox/cats.core.html create mode 100644 devel/codox/cats.data.html create mode 100644 devel/codox/cats.monad.continuation.html create mode 100644 devel/codox/cats.monad.either.html create mode 100644 devel/codox/cats.monad.exception.html create mode 100644 devel/codox/cats.monad.html create mode 100644 devel/codox/cats.monad.identity.html create mode 100644 devel/codox/cats.monad.maybe.html create mode 100644 devel/codox/cats.monad.reader.html create mode 100644 devel/codox/cats.monad.state.html create mode 100644 devel/codox/cats.monad.writer.html create mode 100644 devel/codox/cats.protocols.html create mode 100644 devel/codox/css/default.css create mode 100644 devel/codox/index.html create mode 100644 devel/codox/js/jquery.min.js create mode 100644 devel/codox/js/page_effects.js create mode 100644 devel/index.html create mode 100644 devel/logo.png diff --git a/devel/codox/cats.builtin.html b/devel/codox/cats.builtin.html new file mode 100644 index 0000000..b69c249 --- /dev/null +++ b/devel/codox/cats.builtin.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.core.html b/devel/codox/cats.core.html new file mode 100644 index 0000000..040b43f --- /dev/null +++ b/devel/codox/cats.core.html @@ -0,0 +1,140 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. +</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. +Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the +arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. +</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, +ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. + +Example: + (>>= (just 1) (comp just inc) (comp just inc)) + ;=> #<Just [3]> +</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, +applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside +av's context, applies the function to value and return +a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, +returning the identity element when the predicate yields false. + +Otherwise, returns the instance unchanged. + + (require '[cats.monad.moaybe :as maybe]) + (require '[cats.core :as m]) + + (m/filter (partial < 2) (maybe/just 3)) + ;=> <Just [3]> + + (m/filter (partial < 4) (maybe/just 3)) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. + +(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(m/forseq [2 3] maybe/just) +;=> <Just [[2 3]]> + +(m/forseq [1 2] + (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing)))) +;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value +of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a +monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (def monad+ (m/lift-m 2 +)) + + (monad+ (maybe/just 1) (maybe/just 2)) + ;=> <Just [3]> + + (monad+ (maybe/just 1) (maybe/nothing)) + ;=> <Nothing> + + (monad+ [0 2 4] [1 2]) + ;=> [1 2 3 4 5 6] +</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a +monadic context, map it into the given collection +calling sequence on the results. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/mapseq maybe/just [2 3]) + ;=> <Just [[2 3]]> + + (m/mapseq (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing))) + [1 2]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure +let. This allows much easy composition of monadic +computations. + +Let see one example for understand how it works, this is +a code using bind for compose few number of operations: + + + (bind (just 1) + (fn [a] + (bind (just (inc a)) + (fn [b] + (return (* b 2)))))) + ;=> #<Just [4]> + +Now see how this code can be more clear if you +are using mlet macro for do it: + + (mlet [a (just 1) + b (just (inc a))] + (return (* b 2))) + ;=> #<Just [4]> +</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the +same as mlet but specifying the monadic context. +So, instead of writing: + + (with-monad (maybe-transformer vector-monad) + (mlet [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2)))) + ;=> [#<Just [4]> #<Just [6]>] + +You can just write: + + (mlet-with (maybe-transformer vector-monad) + [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2))) + ;=> [#<Just [4]> #<Just [6]>] +</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +default/effect free context. + +This is multiarity function that with arity pure/1 +it uses the dynamic scope to resolve the current +context. With pure/2, you can force a specific context +value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect +their values in a vector returned in the monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/sequence [(maybe/just 2) (maybe/just 3)]) + ;=> <Just [[2, 3]]> + + (m/sequence [(maybe/nothing) (maybe/just 3)]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.data.html b/devel/codox/cats.data.html new file mode 100644 index 0000000..7cc6f61 --- /dev/null +++ b/devel/codox/cats.data.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. +</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.continuation.html b/devel/codox/cats.monad.continuation.html new file mode 100644 index 0000000..7ad219b --- /dev/null +++ b/devel/codox/cats.monad.continuation.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. +</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.either.html b/devel/codox/cats.monad.either.html new file mode 100644 index 0000000..9d4a9e0 --- /dev/null +++ b/devel/codox/cats.monad.either.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. +</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. +</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.exception.html b/devel/codox/cats.monad.exception.html new file mode 100644 index 0000000..d0d5be1 --- /dev/null +++ b/devel/codox/cats.monad.exception.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. + +The Try type represents a computation that may either result in an exception, +or return a successfully computed value. It's similar to, but semantically +different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. +</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. +</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. +</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. + +Is a high order function that accept a function +as parameter and returns an other that returns +success or failure depending of result of the +first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.html b/devel/codox/cats.monad.html new file mode 100644 index 0000000..180d274 --- /dev/null +++ b/devel/codox/cats.monad.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.identity.html b/devel/codox/cats.monad.identity.html new file mode 100644 index 0000000..fd49b6a --- /dev/null +++ b/devel/codox/cats.monad.identity.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. +</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. +</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.maybe.html b/devel/codox/cats.monad.maybe.html new file mode 100644 index 0000000..0a07f35 --- /dev/null +++ b/devel/codox/cats.monad.maybe.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. +</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. + +Examples: + (from-maybe (just 1)) + ;=> 1 + (from-maybe (just 1) 42) + ;=> 1 + (from-maybe (nothing)) + ;=> nil + (from-maybe (nothing) 42) + ;=> 42 +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.reader.html b/devel/codox/cats.monad.reader.html new file mode 100644 index 0000000..5d28e2a --- /dev/null +++ b/devel/codox/cats.monad.reader.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. +</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function +to Reader class instance. +Reader class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the +wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.state.html b/devel/codox/cats.monad.state.html new file mode 100644 index 0000000..0c1496c --- /dev/null +++ b/devel/codox/cats.monad.state.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. +</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +value, ignoring the state. +Equivalent to taking the first value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +state. +Equivalent to taking the second value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns +the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces +the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and returns a cats.data.Pair +instance with result and new state. + + (def computation (mlet [x (get-state) + y (put-state (inc x))] + (return y))) + + (def initial-state 1) + (run-state computation initial-state) + +This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function +to State class instance. +State class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the +specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.writer.html b/devel/codox/cats.monad.writer.html new file mode 100644 index 0000000..c38c27e --- /dev/null +++ b/devel/codox/cats.monad.writer.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. +</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.protocols.html b/devel/codox/cats.protocols.html new file mode 100644 index 0000000..ec2d5f7 --- /dev/null +++ b/devel/codox/cats.protocols.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) +inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts +the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. +</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. +</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. +</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state +and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. +</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. +</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. +</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. +</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, +yield a writer which has the first element of the pair as the value and +the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. +</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/css/default.css b/devel/codox/css/default.css new file mode 100644 index 0000000..fcabf4e --- /dev/null +++ b/devel/codox/css/default.css @@ -0,0 +1,455 @@ +body { + font-family: Helvetica, Arial, sans-serif; + font-size: 15px; +} + +pre, code { + font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; + font-size: 9pt; + margin: 15px 0; +} + +h2 { + font-weight: normal; + font-size: 28px; + padding: 10px 0 2px 0; + margin: 0; +} + +#header, #content, .sidebar { + position: fixed; +} + +#header { + top: 0; + left: 0; + right: 0; + height: 20px; + background: #444; + color: #fff; + padding: 5px 7px; +} + +#content { + top: 30px; + right: 0; + bottom: 0; + overflow: auto; + background: #fff; + color: #333; + padding: 0 18px; +} + +.sidebar { + position: fixed; + top: 30px; + bottom: 0; + overflow: auto; +} + +#namespaces { + background: #e2e2e2; + border-right: solid 1px #cccccc; + left: 0; + width: 250px; +} + +#vars { + background: #f2f2f2; + border-right: solid 1px #cccccc; + left: 251px; + width: 200px; +} + +.namespace-index { + left: 251px; +} + +.namespace-docs { + left: 452px; +} + +#header { + background: -moz-linear-gradient(top, #555 0%, #222 100%); + background: -webkit-linear-gradient(top, #555 0%, #333 100%); + background: -o-linear-gradient(top, #555 0%, #222 100%); + background: -ms-linear-gradient(top, #555 0%, #222 100%); + background: linear-gradient(top, #555 0%, #222 100%); + box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); + z-index: 100; +} + +#header h1 { + margin: 0; + padding: 0; + font-size: 12pt; + font-weight: lighter; + text-shadow: -1px -1px 0px #333; +} + +#header a, .sidebar a { + display: block; + text-decoration: none; +} + +#header a { + color: #fff; +} + +.sidebar a { + color: #333; +} + +#header h2 { + float: right; + font-size: 9pt; + font-weight: normal; + margin: 3px 3px; + padding: 0; + color: #bbb; +} + +#header h2 a { + display: inline; +} + +.sidebar h3 { + margin: 0; + padding: 10px 10px 0 10px; + font-size: 19px; + font-weight: normal; +} + +.sidebar ul { + padding: 0.5em 0em; + margin: 0; +} + +.sidebar li { + display: block; + vertical-align: middle; +} + +.sidebar li a, .sidebar li .no-link { + border-left: 3px solid transparent; + padding: 0 7px; + white-space: nowrap; +} + +.sidebar li .no-link { + display: block; + color: #777; + font-style: italic; +} + +.sidebar li .inner { + display: inline-block; + padding-top: 7px; + height: 24px; +} + +.sidebar li a, .sidebar li .tree { + height: 31px; +} + +.depth-1 .inner { padding-left: 2px; } +.depth-2 .inner { padding-left: 6px; } +.depth-3 .inner { padding-left: 20px; } +.depth-4 .inner { padding-left: 34px; } +.depth-5 .inner { padding-left: 48px; } +.depth-6 .inner { padding-left: 62px; } + +.sidebar li .tree { + display: block; + float: left; + position: relative; + top: -10px; + margin: 0 4px 0 0; + padding: 0; +} + +.sidebar li.depth-1 .tree { + display: none; +} + +.sidebar li .tree .top, .sidebar li .tree .bottom { + display: block; + margin: 0; + padding: 0; + width: 7px; +} + +.sidebar li .tree .top { + border-left: 1px solid #aaa; + border-bottom: 1px solid #aaa; + height: 19px; +} + +.sidebar li .tree .bottom { + height: 22px; +} + +.sidebar li.branch .tree .bottom { + border-left: 1px solid #aaa; +} + +#namespaces li.current a { + border-left: 3px solid #a33; + color: #a33; +} + +#vars li.current a { + border-left: 3px solid #33a; + color: #33a; +} + +#content h3 { + font-size: 13pt; + font-weight: bold; +} + +.public h3 { + margin: 0; + float: left; +} + +.usage { + clear: both; +} + +.public { + margin: 0; + border-top: 1px solid #e0e0e0; + padding-top: 14px; + padding-bottom: 6px; +} + +.public:last-child { + margin-bottom: 20%; +} + +.members .public:last-child { + margin-bottom: 0; +} + +.members { + margin: 15px 0; +} + +.members h4 { + color: #555; + font-weight: normal; + font-variant: small-caps; + margin: 0 0 5px 0; +} + +.members .inner { + padding-top: 5px; + padding-left: 12px; + margin-top: 2px; + margin-left: 7px; + border-left: 1px solid #bbb; +} + +#content .members .inner h3 { + font-size: 12pt; +} + +.members .public { + border-top: none; + margin-top: 0; + padding-top: 6px; + padding-bottom: 0; +} + +.members .public:first-child { + padding-top: 0; +} + +h4.type, +h4.dynamic, +h4.added, +h4.deprecated { + float: left; + margin: 3px 10px 15px 0; + font-size: 15px; + font-weight: bold; + font-variant: small-caps; +} + +.public h4.type, +.public h4.dynamic, +.public h4.added, +.public h4.deprecated { + font-size: 13px; + font-weight: bold; + margin: 3px 0 0 10px; +} + +.members h4.type, +.members h4.added, +.members h4.deprecated { + margin-top: 1px; +} + +h4.type { + color: #717171; +} + +h4.dynamic { + color: #9933aa; +} + +h4.added { + color: #508820; +} + +h4.deprecated { + color: #880000; +} + +.namespace { + margin-bottom: 30px; +} + +.namespace:last-child { + margin-bottom: 10%; +} + +.index { + padding: 0; + font-size: 80%; + margin: 15px 0; + line-height: 16px; +} + +.index * { + display: inline; +} + +.index p { + padding-right: 3px; +} + +.index li { + padding-right: 5px; +} + +.index ul { + padding-left: 0; +} + +.usage code { + display: block; + color: #008; + margin: 2px 0; +} + +.usage code:first-child { + padding-top: 10px; +} + +p { + margin: 15px 0; +} + +.public p:first-child, .public pre.plaintext { + margin-top: 12px; +} + +.doc { + margin: 0 0 26px 0; + clear: both; +} + +.public .doc { + margin: 0; +} + +.namespace-index .doc { + margin-bottom: 20px; +} + +.namespace-index .namespace .doc { + margin-bottom: 10px; +} + +.markdown { + line-height: 18px; + font-size: 14px; +} + +.doc, .public, .namespace .index { + max-width: 680px; + overflow-x: visible; +} + +.markdown code, .src-link a { + background: #f6f6f6; + border: 1px solid #e4e4e4; + border-radius: 2px; +} + +.markdown pre { + background: #f4f4f4; + border: 1px solid #e0e0e0; + border-radius: 2px; + padding: 5px 10px; + margin: 0 10px; +} + +.markdown pre code { + background: transparent; + border: none; +} + +.doc ul, .doc ol { + padding-left: 30px; +} + +.doc table { + border-collapse: collapse; + margin: 0 10px; +} + +.doc table td, .doc table th { + border: 1px solid #dddddd; + padding: 4px 6px; +} + +.doc table th { + background: #f2f2f2; +} + +.doc dl { + margin: 0 10px 20px 10px; +} + +.doc dl dt { + font-weight: bold; + margin: 0; + padding: 3px 0; + border-bottom: 1px solid #ddd; +} + +.doc dl dd { + padding: 5px 0; + margin: 0 0 5px 10px; +} + +.doc abbr { + border-bottom: 1px dotted #333; + font-variant: none + cursor: help; +} + +.src-link { + margin-bottom: 15px; +} + +.src-link a { + font-size: 70%; + padding: 1px 4px; + text-decoration: none; + color: #5555bb; +} \ No newline at end of file diff --git a/devel/codox/index.html b/devel/codox/index.html new file mode 100644 index 0000000..2ac541d --- /dev/null +++ b/devel/codox/index.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.4.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.4.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/js/jquery.min.js b/devel/codox/js/jquery.min.js new file mode 100644 index 0000000..73f33fb --- /dev/null +++ b/devel/codox/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/devel/codox/js/page_effects.js b/devel/codox/js/page_effects.js new file mode 100644 index 0000000..ef8120d --- /dev/null +++ b/devel/codox/js/page_effects.js @@ -0,0 +1,99 @@ +function visibleInParent(element) { + var position = $(element).position().top + return position > -50 && position < ($(element).offsetParent().height() - 50) +} + +function hasFragment(link, fragment) { + return $(link).attr("href").indexOf("#" + fragment) != -1 +} + +function findLinkByFragment(elements, fragment) { + return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() +} + +function scrollToCurrentVarLink(elements) { + var elements = $(elements); + var parent = elements.offsetParent(); + + if (elements.length == 0) return; + + var top = elements.first().position().top; + var bottom = elements.last().position().top + elements.last().height(); + + if (top >= 0 && bottom <= parent.height()) return; + + if (top < 0) { + parent.scrollTop(parent.scrollTop() + top); + } + else if (bottom > parent.height()) { + parent.scrollTop(parent.scrollTop() + bottom - parent.height()); + } +} + +function setCurrentVarLink() { + $('#vars a').parent().removeClass('current') + $('.anchor'). + filter(function(index) { return visibleInParent(this) }). + each(function(index, element) { + findLinkByFragment("#vars a", element.id). + parent(). + addClass('current') + }); + scrollToCurrentVarLink('#vars .current'); +} + +var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) + +function scrollPositionId(element) { + var directory = window.location.href.replace(/[^\/]+\.html$/, '') + return 'scroll::' + $(element).attr('id') + '::' + directory +} + +function storeScrollPosition(element) { + if (!hasStorage) return; + localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) + localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) +} + +function recallScrollPosition(element) { + if (!hasStorage) return; + $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) + $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) +} + +function persistScrollPosition(element) { + recallScrollPosition(element) + $(element).scroll(function() { storeScrollPosition(element) }) +} + +function sidebarContentWidth(element) { + var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) + return Math.max.apply(Math, widths) +} + +function resizeSidebars() { + var nsWidth = sidebarContentWidth('#namespaces') + 30 + var varWidth = 0 + + if ($('#vars').length != 0) { + varWidth = sidebarContentWidth('#vars') + 30 + } + + // snap to grid + var snap = 30; + nsWidth = Math.ceil(nsWidth / snap) * snap; + varWidth = Math.ceil(varWidth / snap) * snap; + + $('#namespaces').css('width', nsWidth) + $('#vars').css('width', varWidth) + $('#vars, .namespace-index').css('left', nsWidth + 1) + $('.namespace-docs').css('left', nsWidth + varWidth + 2) +} + +$(window).ready(resizeSidebars) +$(window).ready(setCurrentVarLink) +$(window).ready(function() { persistScrollPosition('#namespaces')}) +$(window).ready(function() { + $('#content').scroll(setCurrentVarLink) + $(window).resize(setCurrentVarLink) +}) diff --git a/devel/index.html b/devel/index.html new file mode 100644 index 0000000..b362a50 --- /dev/null +++ b/devel/index.html @@ -0,0 +1,1570 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="UTF-8"> +<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<meta name="generator" content="Asciidoctor 1.5.2"> +<meta name="author" content="Andrey Antukh & Alejandro Gómez"> +<title>Cats Documentation</title> +<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400"> +<style> +/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ +/* Remove the comments around the @import statement below when using this as a custom stylesheet */ +/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/ +article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} +audio,canvas,video{display:inline-block} +audio:not([controls]){display:none;height:0} +[hidden],template{display:none} +script{display:none!important} +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} +body{margin:0} +a{background:transparent} +a:focus{outline:thin dotted} +a:active,a:hover{outline:0} +h1{font-size:2em;margin:.67em 0} +abbr[title]{border-bottom:1px dotted} +b,strong{font-weight:bold} +dfn{font-style:italic} +hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} +mark{background:#ff0;color:#000} +code,kbd,pre,samp{font-family:monospace;font-size:1em} +pre{white-space:pre-wrap} +q{quotes:"\201C" "\201D" "\2018" "\2019"} +small{font-size:80%} +sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sup{top:-.5em} +sub{bottom:-.25em} +img{border:0} +svg:not(:root){overflow:hidden} +figure{margin:0} +fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} +legend{border:0;padding:0} +button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} +button,input{line-height:normal} +button,select{text-transform:none} +button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} +button[disabled],html input[disabled]{cursor:default} +input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} +input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} +input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} +button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} +textarea{overflow:auto;vertical-align:top} +table{border-collapse:collapse;border-spacing:0} +*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} +html,body{font-size:100%} +body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} +a:hover{cursor:pointer} +img,object,embed{max-width:100%;height:auto} +object,embed{height:100%} +img{-ms-interpolation-mode:bicubic} +#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} +.left{float:left!important} +.right{float:right!important} +.text-left{text-align:left!important} +.text-right{text-align:right!important} +.text-center{text-align:center!important} +.text-justify{text-align:justify!important} +.hide{display:none} +.antialiased,body{-webkit-font-smoothing:antialiased} +img{display:inline-block;vertical-align:middle} +textarea{height:auto;min-height:50px} +select{width:100%} +p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} +.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} +div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} +a{color:#2156a5;text-decoration:underline;line-height:inherit} +a:hover,a:focus{color:#1d4b8f} +a img{border:none} +p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} +p aside{font-size:.875em;line-height:1.35;font-style:italic} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} +h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} +h1{font-size:2.125em} +h2{font-size:1.6875em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} +h4,h5{font-size:1.125em} +h6{font-size:1em} +hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} +em,i{font-style:italic;line-height:inherit} +strong,b{font-weight:bold;line-height:inherit} +small{font-size:60%;line-height:inherit} +code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} +ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} +ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} +ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} +ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} +ul.square{list-style-type:square} +ul.circle{list-style-type:circle} +ul.disc{list-style-type:disc} +ul.no-bullet{list-style:none} +ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} +dl dt{margin-bottom:.3125em;font-weight:bold} +dl dd{margin-bottom:1.25em} +abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} +abbr{text-transform:none} +blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} +blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} +blockquote cite:before{content:"\2014 \0020"} +blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} +blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} +@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} +h1{font-size:2.75em} +h2{font-size:2.3125em} +h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} +h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} +table thead,table tfoot{background:#f7f8f7;font-weight:bold} +table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} +table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} +table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} +table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} +h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} +h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} +.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} +.clearfix:after,.float-group:after{clear:both} +*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} +pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} +.keyseq{color:rgba(51,51,51,.8)} +kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} +.keyseq kbd:first-child{margin-left:0} +.keyseq kbd:last-child{margin-right:0} +.menuseq,.menu{color:rgba(0,0,0,.8)} +b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} +b.button:before{content:"[";padding:0 3px 0 2px} +b.button:after{content:"]";padding:0 2px 0 3px} +p a>code:hover{color:rgba(0,0,0,.9)} +#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} +#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} +#header:after,#content:after,#footnotes:after,#footer:after{clear:both} +#content{margin-top:1.25em} +#content:before{content:none} +#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} +#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} +#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} +#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} +#header .details span:first-child{margin-left:-.125em} +#header .details span.email a{color:rgba(0,0,0,.85)} +#header .details br{display:none} +#header .details br+span:before{content:"\00a0\2013\00a0"} +#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} +#header .details br+span#revremark:before{content:"\00a0|\00a0"} +#header #revnumber{text-transform:capitalize} +#header #revnumber:after{content:"\00a0"} +#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} +#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} +#toc>ul{margin-left:.125em} +#toc ul.sectlevel0>li>a{font-style:italic} +#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} +#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} +#toc a{text-decoration:none} +#toc a:active{text-decoration:underline} +#toctitle{color:#7a2518;font-size:1.2em} +@media only screen and (min-width:768px){#toctitle{font-size:1.375em} +body.toc2{padding-left:15em;padding-right:0} +#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} +#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} +#toc.toc2>ul{font-size:.9em;margin-bottom:0} +#toc.toc2 ul ul{margin-left:0;padding-left:1em} +#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} +body.toc2.toc-right{padding-left:0;padding-right:15em} +body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} +#toc.toc2{width:20em} +#toc.toc2 #toctitle{font-size:1.375em} +#toc.toc2>ul{font-size:.95em} +#toc.toc2 ul ul{padding-left:1.25em} +body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +#content #toc>:first-child{margin-top:0} +#content #toc>:last-child{margin-bottom:0} +#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} +#footer-text{color:rgba(255,255,255,.8);line-height:1.44} +.sect1{padding-bottom:.625em} +@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} +#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} +#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} +#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} +#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} +#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} +.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} +.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} +table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} +.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} +table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} +.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} +.admonitionblock>table td.icon{text-align:center;width:80px} +.admonitionblock>table td.icon img{max-width:none} +.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} +.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} +.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} +.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} +.exampleblock>.content>:first-child{margin-top:0} +.exampleblock>.content>:last-child{margin-bottom:0} +.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} +.sidebarblock>:first-child{margin-top:0} +.sidebarblock>:last-child{margin-bottom:0} +.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} +.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} +.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} +.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} +.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} +.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} +@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} +.listingblock pre.highlightjs{padding:0} +.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} +.listingblock pre.prettyprint{border-width:0} +.listingblock>.content{position:relative} +.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} +.listingblock:hover code[data-lang]:before{display:block} +.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} +.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} +table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} +table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} +table.pyhltable td.code{padding-left:.75em;padding-right:0} +pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} +pre.pygments .lineno{display:inline-block;margin-right:.25em} +table.pyhltable .linenodiv{background:none!important;padding-right:0!important} +.quoteblock{margin:0 1em 1.25em 1.5em;display:table} +.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} +.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} +.quoteblock blockquote{margin:0;padding:0;border:0} +.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} +.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} +.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} +.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} +.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} +.quoteblock .quoteblock blockquote:before{display:none} +.verseblock{margin:0 1em 1.25em 1em} +.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} +.verseblock pre strong{font-weight:400} +.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} +.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} +.quoteblock .attribution br,.verseblock .attribution br{display:none} +.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} +.quoteblock.abstract{margin:0 0 1.25em 0;display:block} +.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} +.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} +table.tableblock{max-width:100%;border-collapse:separate} +table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} +table.spread{width:100%} +table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} +table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} +table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} +table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} +table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} +table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} +table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} +table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} +table.frame-all{border-width:1px} +table.frame-sides{border-width:0 1px} +table.frame-topbot{border-width:1px 0} +th.halign-left,td.halign-left{text-align:left} +th.halign-right,td.halign-right{text-align:right} +th.halign-center,td.halign-center{text-align:center} +th.valign-top,td.valign-top{vertical-align:top} +th.valign-bottom,td.valign-bottom{vertical-align:bottom} +th.valign-middle,td.valign-middle{vertical-align:middle} +table thead th,table tfoot th{font-weight:bold} +tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} +tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} +p.tableblock>code:only-child{background:none;padding:0} +p.tableblock{font-size:1em} +td>div.verse{white-space:pre} +ol{margin-left:1.75em} +ul li ol{margin-left:1.5em} +dl dd{margin-left:1.125em} +dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} +ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} +ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} +ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} +ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} +ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} +ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} +ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} +ul.inline>li>*{display:block} +.unstyled dl dt{font-weight:400;font-style:normal} +ol.arabic{list-style-type:decimal} +ol.decimal{list-style-type:decimal-leading-zero} +ol.loweralpha{list-style-type:lower-alpha} +ol.upperalpha{list-style-type:upper-alpha} +ol.lowerroman{list-style-type:lower-roman} +ol.upperroman{list-style-type:upper-roman} +ol.lowergreek{list-style-type:lower-greek} +.hdlist>table,.colist>table{border:0;background:none} +.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} +td.hdlist1{padding-right:.75em;font-weight:bold} +td.hdlist1,td.hdlist2{vertical-align:top} +.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} +.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} +.colist>table tr>td:last-of-type{padding:.25em 0} +.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} +.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} +.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} +.imageblock>.title{margin-bottom:0} +.imageblock.thumb,.imageblock.th{border-width:6px} +.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} +.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} +.image.left{margin-right:.625em} +.image.right{margin-left:.625em} +a.image{text-decoration:none} +span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} +span.footnote a,span.footnoteref a{text-decoration:none} +span.footnote a:active,span.footnoteref a:active{text-decoration:underline} +#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} +#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} +#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} +#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} +#footnotes .footnote:last-of-type{margin-bottom:0} +#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} +.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} +.gist .file-data>table td.line-data{width:99%} +div.unbreakable{page-break-inside:avoid} +.big{font-size:larger} +.small{font-size:smaller} +.underline{text-decoration:underline} +.overline{text-decoration:overline} +.line-through{text-decoration:line-through} +.aqua{color:#00bfbf} +.aqua-background{background-color:#00fafa} +.black{color:#000} +.black-background{background-color:#000} +.blue{color:#0000bf} +.blue-background{background-color:#0000fa} +.fuchsia{color:#bf00bf} +.fuchsia-background{background-color:#fa00fa} +.gray{color:#606060} +.gray-background{background-color:#7d7d7d} +.green{color:#006000} +.green-background{background-color:#007d00} +.lime{color:#00bf00} +.lime-background{background-color:#00fa00} +.maroon{color:#600000} +.maroon-background{background-color:#7d0000} +.navy{color:#000060} +.navy-background{background-color:#00007d} +.olive{color:#606000} +.olive-background{background-color:#7d7d00} +.purple{color:#600060} +.purple-background{background-color:#7d007d} +.red{color:#bf0000} +.red-background{background-color:#fa0000} +.silver{color:#909090} +.silver-background{background-color:#bcbcbc} +.teal{color:#006060} +.teal-background{background-color:#007d7d} +.white{color:#bfbfbf} +.white-background{background-color:#fafafa} +.yellow{color:#bfbf00} +.yellow-background{background-color:#fafa00} +span.icon>.fa{cursor:default} +.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} +.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} +.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} +.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} +.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} +.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} +.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} +.conum[data-value] *{color:#fff!important} +.conum[data-value]+b{display:none} +.conum[data-value]:after{content:attr(data-value)} +pre .conum[data-value]{position:relative;top:-.125em} +b.conum *{color:inherit!important} +.conum:not([data-value]):empty{display:none} +h1,h2{letter-spacing:-.01em} +dt,th.tableblock,td.content{text-rendering:optimizeLegibility} +p,td.content{letter-spacing:-.01em} +p strong,td.content strong{letter-spacing:-.005em} +p,blockquote,dt,td.content{font-size:1.0625rem} +p{margin-bottom:1.25rem} +.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} +.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} +.print-only{display:none!important} +@media print{@page{margin:1.25cm .75cm} +*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} +a{color:inherit!important;text-decoration:underline!important} +a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} +a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} +abbr[title]:after{content:" (" attr(title) ")"} +pre,blockquote,tr,img{page-break-inside:avoid} +thead{display:table-header-group} +img{max-width:100%!important} +p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} +h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} +#toc,.sidebarblock,.exampleblock>.content{background:none!important} +#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} +.sect1{padding-bottom:0!important} +.sect1+.sect1{border:0!important} +#header>h1:first-child{margin-top:1.25rem} +body.book #header{text-align:center} +body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} +body.book #header .details{border:0!important;display:block;padding:0!important} +body.book #header .details span:first-child{margin-left:0!important} +body.book #header .details br{display:block} +body.book #header .details br+span:before{content:none!important} +body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} +body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} +.listingblock code[data-lang]:before{display:block} +#footer{background:none!important;padding:0 .9375em} +#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} +.hide-on-print{display:none!important} +.print-only{display:block!important} +.hide-for-print{display:none!important} +.show-for-print{display:inherit!important}} +</style> +<style> +.listingblock .pygments .hll { background-color: #ffffcc } +.listingblock .pygments { background: #f0f0f0; } +.listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ +.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ +.listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ +.listingblock .pygments .tok-o { color: #666666 } /* Operator */ +.listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ +.listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ +.listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ +.listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ +.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ +.listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ +.listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ +.listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ +.listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ +.listingblock .pygments .tok-gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ +.listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ +.listingblock .pygments .tok-kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.listingblock .pygments .tok-kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.listingblock .pygments .tok-kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.listingblock .pygments .tok-kp { color: #007020 } /* Keyword.Pseudo */ +.listingblock .pygments .tok-kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.listingblock .pygments .tok-kt { color: #902000 } /* Keyword.Type */ +.listingblock .pygments .tok-m { color: #40a070 } /* Literal.Number */ +.listingblock .pygments .tok-s { color: #4070a0 } /* Literal.String */ +.listingblock .pygments .tok-na { color: #4070a0 } /* Name.Attribute */ +.listingblock .pygments .tok-nb { color: #007020 } /* Name.Builtin */ +.listingblock .pygments .tok-nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.listingblock .pygments .tok-no { color: #60add5 } /* Name.Constant */ +.listingblock .pygments .tok-nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.listingblock .pygments .tok-ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.listingblock .pygments .tok-ne { color: #007020 } /* Name.Exception */ +.listingblock .pygments .tok-nf { color: #06287e } /* Name.Function */ +.listingblock .pygments .tok-nl { color: #002070; font-weight: bold } /* Name.Label */ +.listingblock .pygments .tok-nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.listingblock .pygments .tok-nt { color: #062873; font-weight: bold } /* Name.Tag */ +.listingblock .pygments .tok-nv { color: #bb60d5 } /* Name.Variable */ +.listingblock .pygments .tok-ow { color: #007020; font-weight: bold } /* Operator.Word */ +.listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ +.listingblock .pygments .tok-mb { color: #40a070 } /* Literal.Number.Bin */ +.listingblock .pygments .tok-mf { color: #40a070 } /* Literal.Number.Float */ +.listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ +.listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ +.listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ +.listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ +.listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ +.listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ +.listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.listingblock .pygments .tok-sh { color: #4070a0 } /* Literal.String.Heredoc */ +.listingblock .pygments .tok-si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.listingblock .pygments .tok-sx { color: #c65d09 } /* Literal.String.Other */ +.listingblock .pygments .tok-sr { color: #235388 } /* Literal.String.Regex */ +.listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ +.listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ +.listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ +.listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ +.listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ +.listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ +.listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ +</style> +</head> +<body class="article toc2 toc-left"> +<div id="header"> +<h1>Cats Documentation</h1> +<div class="details"> +<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> +<span id="revdate">0.4.0-SNAPSHOT</span> +</div> +<div id="toc" class="toc2"> +<div id="toctitle">Table of Contents</div> +<ul class="sectlevel1"> +<li><a href="#_introduction">1. Introduction</a> +<ul class="sectlevel2"> +<li><a href="#_why_another_library">1.1. Why another library?</a></li> +</ul> +</li> +<li><a href="#_project_maturity">2. Project Maturity</a></li> +<li><a href="#_install">3. Install</a> +<ul class="sectlevel2"> +<li><a href="#_leiningen">3.1. Leiningen</a></li> +<li><a href="#_maven">3.2. Maven</a></li> +<li><a href="#_get_the_code">3.3. Get the Code</a></li> +</ul> +</li> +<li><a href="#_user_guide">4. User Guide</a> +<ul class="sectlevel2"> +<li><a href="#_functor">4.1. Functor</a></li> +<li><a href="#_applicative">4.2. Applicative</a></li> +<li><a href="#_monad">4.3. Monad</a></li> +<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> +</ul> +</li> +<li><a href="#_monad_types">5. Monad types</a> +<ul class="sectlevel2"> +<li><a href="#_maybe">5.1. Maybe</a></li> +<li><a href="#_either">5.2. Either</a></li> +<li><a href="#_try">5.3. Try</a></li> +<li><a href="#_state">5.4. State</a></li> +<li><a href="#_reader">5.5. Reader</a></li> +<li><a href="#_writer">5.6. Writer</a></li> +<li><a href="#_continuation">5.7. Continuation</a></li> +<li><a href="#_vector">5.8. Vector</a></li> +</ul> +</li> +<li><a href="#_faq">6. FAQ</a> +<ul class="sectlevel2"> +<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</a></li> +</ul> +</li> +<li><a href="#_how_to_contribute">7. How to Contribute?</a> +<ul class="sectlevel2"> +<li><a href="#_philosophy">7.1. Philosophy</a></li> +<li><a href="#_procedure">7.2. Procedure</a></li> +<li><a href="#_license">7.3. License</a></li> +</ul> +</li> +</ul> +</div> +</div> +<div id="content"> +<div id="preamble"> +<div class="sectionbody"> +<div class="paragraph"> +<p><span class="image"><img src="logo.png" alt="cats logo"></span></p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_introduction">1. Introduction</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>Category Theory abstractions for Clojure.</p> +</div> +<div class="sect2"> +<h3 id="_why_another_library">1.1. Why another library?</h3> +<div class="paragraph"> +<p>Because the cats library:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>targets both of the most-used Clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> +</li> +<li> +<p>aims to have the simplest implementation of the supported abstractions.</p> +</li> +<li> +<p>aims to have more abstractions that are simple monads.</p> +</li> +<li> +<p>has documentation as first class citizen.</p> +</li> +<li> +<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> +</li> +</ul> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_project_maturity">2. Project Maturity</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>Since <em>cats</em> is a young project, there can be some <a href="codox/index.html#id">API</a> breakage.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_install">3. Install</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section covers installing <em>cats</em>.</p> +</div> +<div class="sect2"> +<h3 id="_leiningen">3.1. Leiningen</h3> +<div class="paragraph"> +<p>The simplest way to use <em>cats</em> in a Clojure project is by including +it as a dependency in your <strong><em>project.clj</em></strong>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.4.0-SNAPSHOT"</span><span class="tok-p">]</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_maven">3.2. Maven</h3> +<div class="paragraph"> +<p>Also, you can use it with Maven. First, add the Clojars repository:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> + <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> + <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> +<span class="tok-nt"></repository></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Then for cats:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> + <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> + <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> + <span class="tok-nt"><version></span>0.4.0-SNAPSHOT<span class="tok-nt"></version></span> +<span class="tok-nt"></dependency></span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_get_the_code">3.3. Get the Code</h3> +<div class="paragraph"> +<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> +</div> +<div class="paragraph"> +<p>You can clone the public repository with this command:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_user_guide">4. User Guide</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section introduces almost all the category theory abstractions that the <em>cats</em> library +supports.</p> +</div> +<div class="paragraph"> +<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all +the abstractions and it is very easy to understand. You can read more about it in the next +section of the documentation.</p> +</div> +<div class="sect2"> +<h3 id="_functor">4.1. Functor</h3> +<div class="paragraph"> +<p>Let’s start with the functor. The Functor represents some sort of "computational context", and the +abstraction consists of one unique function: <strong>fmap</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Signature of <strong>fmap</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The higher-order function <strong>fmap</strong> takes a plain function as the first parameter and +value wrapped in a functor context as the second parameter. It extracts the inner value +applies the function to it, and returns the result wrapped in same type as the second +parameter.</p> +</div> +<div class="paragraph"> +<p>But, what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor +wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> +</div> +<div class="listingblock"> +<div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-c1">;; `just` function is one of two constructors of Maybe</span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmap over <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to +extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">from-maybe</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 1</span> +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span> +<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absence of a value. +It is a safe substitute for <code>nil</code> and may represent failure.</p> +</div> +<div class="paragraph"> +<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> instance:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmap over <strong>nothing</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Oh, awesome, instead of raising a <code>NullPointerException</code>, it just returns <strong>nothing</strong>. Another +advantage of using the functor abstraction, is that it always returns a result +of the same type as its second argument.</p> +</div> +<div class="paragraph"> +<p>Let’s see an example of applying fmap over a Clojure vector:</p> +</div> +<div class="listingblock"> +<div class="title">Example using fmav over <strong>vector</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 3 4]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The main difference compared to the previous example with Clojure’s map function, is that +map returns lazy seqs no matter what collection we pass to it:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>But why can we pass vectors to fmap? Because some Clojure container types like vectors, +lists and sets also implement the functor abstraction.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_applicative">4.2. Applicative</h3> +<div class="paragraph"> +<p>Let’s continue with applicative functors. The Applicative Functor represents +some sort of "computational context" like a plain Functor, but with abilty to +execute a function wrapped in the same context.</p> +</div> +<div class="paragraph"> +<p>The Applicative Functor abstraction consists of two functions: <strong>fapply</strong> and +<strong>pure</strong>.</p> +</div> +<div class="listingblock"> +<div class="title">Signature of <strong>fapply</strong> function</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +the <strong>pure</strong> function will be explained later. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>The use case for Applicative Functors is much the same as plain Functors: safe +evaluation of some computation in a context.</p> +</div> +<div class="paragraph"> +<p>Let’s see an example to better understand the differences between functor and +applicative functor:</p> +</div> +<div class="paragraph"> +<p>Imagine you have some factory function that, depending on the language, returns a +greeter function, and you only support a few languages.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> + <span class="tok-nv">nil</span><span class="tok-p">))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, before using the resulting greeter you should always defensively check if returned +greeter is a valid function or is a nil value.</p> +</div> +<div class="paragraph"> +<p>Let’s convert this factory to use Maybe type:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> + <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> + <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> + <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can see, this version of the factory differs only slightly from the +original implementation. And this tiny change gives you a new superpower: you +can apply the returned greeter to any value without a defensive nil check:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hola Alex]></span> + +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [Hello Alex]></span> + +<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Moreover, the applicative functor comes with <strong>pure</strong> function, and the main purpose of this function is +to put some value in side-effect-free context of the current type.</p> +</div> +<div class="paragraph"> +<p>Examples:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [5]></span> + +<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>If you do not understand the purpose of the <strong>pure</strong> function, the next section +should clarify its purpose.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_monad">4.3. Monad</h3> +<div class="paragraph"> +<p>Monads are the most discussed programming concept to come from category theory. Like functors and +applicatives, monads deal with data in contexts.</p> +</div> +<div class="paragraph"> +<p>Additionaly, monads can also transform contexts by unwrapping data, applying functions to it and +putting new values in a completely different context.</p> +</div> +<div class="paragraph"> +<p>The monad abstraction consists of two functions: <strong>bind</strong> and <strong>return</strong></p> +</div> +<div class="listingblock"> +<div class="title">Bind function signature.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can see, bind works much like a Functor but with inverted arguments. The main difference is +that in a monad, the function is a responsible for wrapping a returned value in a context.</p> +</div> +<div class="listingblock"> +<div class="title">Example usage of the bind higher-order function.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>One of the key features of the bind function is that any computation executed within the context of +bind (monad) knows the context type implicitly. With this, if you apply some computation over some +monadic value and you want to return the result in the same container context but don’t know +what that container is, you can use <code>return</code> or <code>pure</code> functions:</p> +</div> +<div class="listingblock"> +<div class="title">Usage of return function in bind context.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context +value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> +</div> +<div class="paragraph"> +<p>We now can compose any number of computations using monad <strong>*bind</strong> +functions. But observe what happens when the number of computations increases:</p> +</div> +<div class="listingblock"> +<div class="title">Composability example of bind function.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>This can quickly lead to callback hell. To solve this, <em>cats</em> comes with a powerful +macro: <strong>mlet</strong></p> +</div> +<div class="listingblock"> +<div class="title">Previous example but using <strong>mlet</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +If you are coming from Haskell, mlet represents the <strong>do-syntax</strong>. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>If you want to use regular (non-monadic) let bindings inside an <code>mlet</code> block, you can do so using +<code>:let</code> and a binding vector inside the mlet bindings:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_monad_transformers">4.4. Monad Transformers</h3> +<div class="sect3"> +<h4 id="_motivation">4.4.1. Motivation</h4> +<div class="paragraph"> +<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, +we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> + <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> + +<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> +<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> +<span class="tok-c1">; contain a value of any type.</span> +<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> +<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>However, monads don’t compose as nicely as functors do. We have to actually implement +the composition ourselves.</p> +</div> +<div class="paragraph"> +<p>In some circumstances we would like combine the effects of two monads into another one. We call the +resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A +monad transformer is itself a monad.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> +<div class="paragraph"> +<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer +using State as the base monad since we want the resulting type to be a stateful computation +that may fail: <code>s -> Maybe (a, s)</code>.</p> +</div> +<div class="paragraph"> +<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with +any other monad. The transformer functions take a Monad as their argument and they +return a reified MonadTrans:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> + <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> + +<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful +function that yields a Maybe containing a pair (value, next state).</p> +</div> +<div class="paragraph"> +<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. +When working with monad transformers, we have to be explicit about what monad we are using to implement +the binding policy since there is no way to distinguish values from a transformer type from those of +a regular monad.</p> +</div> +<div class="paragraph"> +<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> +</div> +<div class="paragraph"> +<p>Let’s see it in action:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> + <span class="tok-s">"A function that takes an input string as an state and</span> +<span class="tok-s"> consumes one character yielding it as a the value. The</span> +<span class="tok-s"> new state is the input string with the character consumed.</span> + +<span class="tok-s"> It fails when there isn't a character to consume."</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">Clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> + +<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Nothing ></span> + +<span class="tok-c1">; We could have written `any-two-chars` more succinctly by using `cats.core/mlet-with`,</span> +<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> + <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> + +<span class="tok-c1">; We also define a function for applying parser to a given input</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> +</div> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_monad_types">5. Monad types</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>In our examples we have seen two types that implement +the monad abstraction: Maybe and Either. But these are only two of the types +that implements the Monad abstraction. In this section, we will explain the different +monad types supported by <em>cats</em> library.</p> +</div> +<div class="sect2"> +<h3 id="_maybe">5.1. Maybe</h3> +<div class="paragraph"> +<p>This is one of the two most used monad types (also named Optional in other programming +languages).</p> +</div> +<div class="paragraph"> +<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is +used as the return type of functions which may or may not return a meaningful value when they +are applied. It consists of either an empty constructor (called None or Nothing), or a constructor +encapsulating the original data type A (written Just A or Some A).</p> +</div> +<div class="paragraph"> +<p><em>cats</em>, implements two constructors:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>(just v)</code>: represents just a value in a context.</p> +</li> +<li> +<p><code>(nothing)</code>: represents a failure or null.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just [1]></span> +<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Maybe types are: Functors, Applicative Functors and Monads +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_either">5.2. Either</h3> +<div class="paragraph"> +<p>Either is another type that represents a result of computation, but (in contrast with maybe) +it can return some data with a failed computation result.</p> +</div> +<div class="paragraph"> +<p>In <em>cats</em> it has two constructors:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>(left v)</code>: represents a failure.</p> +</li> +<li> +<p><code>(right v)</code>: represents a successful result.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>Either</strong> constructors.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Right [:valid-value :right]></span> + +<span class="tok-p">(</span><span class="tok-nb">left </span><span class="tok-s">"Error message"</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Either [Error message :left]></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Either is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_try">5.3. Try</h3> +<div class="paragraph"> +<p>Also called Exception.</p> +</div> +<div class="paragraph"> +<p>The <code>Try</code> type represents a computation that may either result in an exception +or return a successfully computed value. It’s similar to, but semantically +different from, the <code>Either</code> type.</p> +</div> +<div class="paragraph"> +<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error +handling with heap-based error handling. Instead of having an exception thrown and +having to deal with it immediately in the same thread, it disconnects the error +handling and recovery.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of <strong>try-on</strong> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [1]></span> + +<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Failure [#<NullPointerException java.lang.NullPointerException>]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that +returns a default value if a computation fails, and <code>try-or-recover</code> that lets +you handle the return value when executing a function with the exception as +first parameter.</p> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-else</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Success [2]></span></code></pre> +</div> +</div> +<div class="listingblock"> +<div class="title">Usage example of <code>try-or-recover</code> macro.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">cond</span> + <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> + <span class="tok-ss">:else</span> <span class="tok-mi">100</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Success [0]></span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +Try is also (like Maybe) Functor, Applicative Functor and Monad. +</td> +</tr> +</table> +</div> +</div> +<div class="sect2"> +<h3 id="_state">5.4. State</h3> +<div class="paragraph"> +<p>State monad in one of the special cases of monads most used in Haskell. It has different +purposes including: lazy computation, composition, and maintaining state without explicit state.</p> +</div> +<div class="paragraph"> +<p>The de-facto monadic type of the state monad is a plain function. Function represents a computation +as is (without executing it). Obviously, a function should have some special characteristics to work +in monad state composition.</p> +</div> +<div class="listingblock"> +<div class="title">Valid function for valid state monad</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> + <span class="tok-s">"Takes state as argument and return a vector</span> +<span class="tok-s"> with first argument with procesed value and</span> +<span class="tok-s"> second argument the transformed new state."</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> + <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> + <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>You just saw an example of the low-level primitive state monad. For basic usage +you do not need to build your own functions, just use some helpers that <em>cats</em> provides.</p> +</div> +<div class="paragraph"> +<p>Let’s look at one example before explaining the details:</p> +</div> +<div class="listingblock"> +<div class="title">Lazy composition of computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> + <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> +<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>At the moment of evaluation in the previous expression, anything that we have defined +is executed. But instead of returning the unadorned final value of the computation, +a strange/unknown object is returned of type <strong>State</strong>.</p> +</div> +<div class="paragraph"> +<p>State is simply a wrapper for Clojure functions, nothing more.</p> +</div> +<div class="paragraph"> +<p>Now, it’s time to execute the composed computation. For this we can use one of the following +functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>run-state</code> function executes the composed computation and returns both the value and the +result state.</p> +</li> +<li> +<p><code>eval-state</code> function executes the composed computation and returns the resulting value +discarding the state.</p> +</li> +<li> +<p><code>exec-state</code> function executes the composed computation and return only the resulting +state, ignoring the resulting value.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> +<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> 1</span> +<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;;=> (2 3)</span></code></pre> +</div> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +the pair instance returned by <code>run-state</code> function works like any other seq in Clojure, with +the difference that pairs can only have two slots. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them +seems out of the scope of this document.</p> +</div> +<div class="paragraph"> +<p>However, if you have better examples to explain the state monad, documentation for another monad or +any other contribution is always welcome.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_reader">5.5. Reader</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_writer">5.6. Writer</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_continuation">5.7. Continuation</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_vector">5.8. Vector</h3> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_faq">6. FAQ</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> +<div class="paragraph"> +<p>This is an incomplete list of differences with other existing libraries:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling +is slighty limited (e.g. you always need to specify what monad you want use instead of +relying on the type). And obviously because it only has monads.</p> +</li> +<li> +<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big +difference with fluokitten is that <code>cats</code> doesn’t aim to extend every Clojure type +with monadic protocols, for the obvious reason that monad; functor and applicative represents +context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> +</li> +<li> +<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation +has much unnecesary complexity.</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</h3> +<div class="paragraph"> +<p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types +that don’t act like containers. For example, Clojure keywords are values but can not be containers so +they should not extend any of the previously explained protocols.</p> +</div> +<table class="tableblock frame-all grid-all spread"> +<caption class="title">Table 1. Summary of Clojure types and implemented protocols</caption> +<colgroup> +<col style="width: 50%;"> +<col style="width: 50%;"> +</colgroup> +<thead> +<tr> +<th class="tableblock halign-left valign-top">Name</th> +<th class="tableblock halign-left valign-top">Implemented protocols</th> +</tr> +</thead> +<tbody> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +</tbody> +</table> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_how_to_contribute">7. How to Contribute?</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_philosophy">7.1. Philosophy</h3> +<div class="paragraph"> +<p>Five most important rules:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Beautiful is better than ugly.</p> +</li> +<li> +<p>Explicit is better than implicit.</p> +</li> +<li> +<p>Simple is better than complex.</p> +</li> +<li> +<p>Complex is better than complicated.</p> +</li> +<li> +<p>Readability counts.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>All contributions to <em>cats</em> should keep these important rules in mind.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_procedure">7.2. Procedure</h3> +<div class="paragraph"> +<p><em>cats</em> does not have many restrictions for contributions. Just follow these +steps depending on the situation:</p> +</div> +<div class="paragraph"> +<p><strong>Bugfix</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Fork the GitHub repo.</p> +</li> +<li> +<p>Fix a bug/typo on a new branch.</p> +</li> +<li> +<p>Make a pull-request to master.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p><strong>New feature</strong>:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Open new issue with the new feature proposal.</p> +</li> +<li> +<p>If it is accepted, follow the same steps as "bugfix".</p> +</li> +</ul> +</div> +</div> +<div class="sect2"> +<h3 id="_license">7.3. License</h3> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> +Copyright (c) 2014-2015 Alejandro Gómez + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</code></pre> +</div> +</div> +</div> +</div> +</div> +</div> +<div id="footer"> +<div id="footer-text"> +Last updated 2015-02-21 12:07:49 CET +</div> +</div> +</body> +</html> \ No newline at end of file diff --git a/devel/logo.png b/devel/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9f1a8f949faea6d5a7768f1aa02b68a648f87979 GIT binary patch literal 5208 zcmV-e6sPNnP)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00004b3#c}2nYxW zd<bNS00009a7bBm000}W000}W0bUxB8~^|S8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H16V*vXK~#90?VWj?71fo;zlT+2iyH`tw8j{hpg0;gL{MVJjJufV zd_Y4qL1UuHn9R6FjWL=;qZ311Mx&z>HIul6pdUnn8r0~3F}NTqk!Euth=PcUG~D^) z+-Kh|>b+N0_tvXwyMLe0`E>QGyWdlHIrrRi#27;-Ixe~tU4Tv$i%tgU;OJz44vtO+ z=-}vNfDVp!&j2FQwZObZMA~&5w#&kcNEZ>AC?b=Aw?$-yh}<tCdp0Ql5h5}TcpF$Q zB6o?%*hb_X9LAV-ML=I*3SeUBBj947YfgFh1g-(rSIPfIpnK76l&Vfe7a(N^GyyMG zX?&L+2eu2G_h*4Q3G$u^Y*BPuec~7Z*aY}nf)1$A+rR|h(E#WUd=q#tMcxkrQgoYr z(iq^zn1-GLoC|!}etB`7F(3F^+M(Gp+_!<nRnmO`7z<noOpAGcLD6mYiD3X>T%>V7 z1Wt|#_Z7Pii0iO-fZthW*b&$?61NwyGjKXE8CYE<oz=h>WAgqMu+9nB0*orU?b<y9 z0Gk6VBb{(ejqu-1F;uSv769+2h%>%M-V-8W7XdwsZo~G@09Qok*9389r0CEzba$P6 z1$Z(N=etF>VJ#}P96&?{0B1QrwE+KCCr(#%xX%MCL`15+G|C0vK|8*J^F*X~PUZ1O z(HvOki@KJ!U(>Z!!gU1>0Db~2C7-XqLJNRPfW4@)(g$vj#JRBOwyfI5MHiq(=WmNH z_S}Zt%Xz;Qx;VT8Sdnw5SEDz8TY=+&eoooOM8d5EHZQtO<EUHRA)+`;L?v%7Mu^Br z;5c9e#f!4HK^J}#fEE#X1h^O2G7|2!Xhabif{t3ffj+=yz%#(3#+VQDD{=%yb6}OP zzZ>v6#eCJFX(2E;GO}F<tgRA$4RAloR9$j!>!Lfm3IiNhf{qJ8%Ye@~_4*+jPiwVk z7BIXcGQdM6=)4d##;H>p`GiX?z?I~6z*Tf-$8`RVz=jfZo-e)R)agj7pCBfs*d35B z6}^ax!$ee|(%x}1fQWQM&oO-4`b-fytA4O_5X+&ZfQa-&_wid5T^3KQLl=I_MdUc( zo<QktK*iuw0;N~F5nwFszw-eeH^wZt&!+`Uw+nEWi0l|L!7}0Wq6-iRA2`qZ1x~vc zaDJ%7O2YsmvMVq$L)1T`+r}Zl0ALV$jz1?{=>T{P_$tsJ6##7qoCN$eCagQJ=F!IE ztsu!CMX&mum2y<>pM*|u;`czMYTcdR&d!i#l-2<!*2(9bNSr@9@7@nkhTL`qr5OQ$ z6EeivTtr5R$Q`K4)@opxh)fcZt&K5P<2MJl0ADf2{8mJoMC2Cqq;WOyu87<uBKx9> zsxI7iUF?y6Eqq->`g^BR^p|hHl3fY^h0Fs6qn(lUuxOrBzSmO3TZ29PL65WZ7y%4$ z&L?FA7@b3!I|DCZwRE$lAtEz?+34CLDK-O6wa>SrBSs!L&^v{qzkd6b{Eqy-lA@>? zE4~FT$SIGveA~Vhf*=uDhOVv~jb*@ebY4FIRq_al<Bc)*0Eoz~=m}qF>|~6YpE-63 zzWy}x|C_)K=+-a9aq)gmIl2IIJ<?hXJPiB_WhjHLJ$AF{cSG+BgdPPp(vEI#Yk=KT zgdKn?Tbyf*8HAp#p9s8^G4Invq@UIEI|^Mlq`@3idby1;W;@_gU?}h@`+f`HArWaZ z#<bY54`wWDHSFXSy96UZMTs)Y7uO6d<Z#uLHmIh`-F1qn0jWGce2<32yN$vrGTw z)Ba^p39B{tuLYh(_3PiVv>N@wwz9M%dUqh}HSycf!<y63YhY>6f^H8NIOSUf^mEF$ z127DDQbZ;gW9|k{5s@XpMH$QN!fWkRb_Q4myn=o~)fiv{x<$)!h_n>A3K)o<L;N~r z{I_iR{!VoUXtC*U1N>e@{@oaJl`-aG5m^dcPj==7-^FtYrhq>Zeqoe^K0sIgBY~$; z9fT_zl=oRq{SPPI#nULg;?@2oV1TDmR(LLOIdBFlKAxVT(Wat9a}zqf7~lu!mv~;v z4!O^k<6FSb&=Da?yopX5jG?-cXgzwly)!_y+qY4A2{;s8^&SLVhTi;5(^yMT9sa(+ zDQtY_@E-J3aS-sE6zRTz-V#0lU6UMvPFuC&YyiIMw8M#HQ-yo3-7)|=>{h$Yn+Ls# z8kne;XEQplx8z)&^|U={{9cAMX8H6%p>hDDwZ6T9Sq=bpq5f*W3HUUAi?bvUVE@Y9 zL1WC%QDIUVto12Cp$uRJFjt`p9d8v`mI5#n*ax^1cveIz2Ue${cL$Qf?-o%3!~P(k zzkU8RI^1rJ?&W_$W2b~7=w;w&TmL3>t80Keoi;i*MSAzQn>7F`YF!EpwErJ(EAgE3 z+fZN<x=ky(vqI8xbf?hGVg3b?Fr)0dZm0k(NxC&{7L<kofZ@PDfaT6_KXNLv0NB-e zw+*_js%EOCz0e2fwe`ME-G-qzi=$y5aKaptF#S79&j7%lw4RVX=KOwFq%!XkG5>-d zs9b_t{VKXM(@--i>Kz=Z&;B*)vH|#<6ZX*r`CMOW2CyBt&?)fk&b$As(g>FjF}{Fa zq5co*@2`ub4^gK6LbUw04u?`-$n@V%_>l?n{6T3M0NrIwjTHEY&ih&?d4B-<R7rO@ zdeb)PJefB=i|YPWH4q7$OfqTTN3^|8Uhkspsbyw>i(?8r!TF-=HO4$(WSu;=N9_j9 z#Qy?jQffg(*q7p1EvZtzT}f}W>Pjd60d>NDsgw)={BxBK8D-z^k)lEV2UWVLm*>{N zc=W8`Zgh7MLN9+csu+4Bx^t;(?gbS$|D3kA1C!D!+M1mCYmKmb`1DgQI)Ngx9cu0* zYAOZPhVK#)ITkgik`(WvYlB}J)vife7C|+Kc5<jc`W3gJ9Ta_DhYF_Vq1U{Zq$npM zauT|O*(OcA2+lFa{LH2|5oNwOY-NmDkvW$fzWg4jWs5j&{RnIJgluwe13V8LOHKw8 zJnFp#s@?QL#(G8RHK2!0yEpO1EEjl}JBNn2u12NiJK-jIHqcUZjWIZM9a7X)(4*YD zNN4&bDSge!>xP*3x0Q+kfG^dl(Bn?ns0<)0twX1hL$Ok}6y+TP9EO!bCXCY^U6@@A zyqZI&yEK<p8xDKMy#IP>7yz}dU9Ul=JK-ni&|vQaPoQTC<5AIb+<ts?Oj+jvpN|RK z1Kp2bh$^3~$+^>`bc9ou=+yezGBLoV2`b~>n*CFQ8gLbGiIeXHs;|sH0FHFRUQT|u zdy~>kr#z=Rzb^~XZ$XZOMdUN6l&&6J!wH*($U6c0qMASz+r!sVT^V*0;3g5N-1c1t zY?^xsYh$Fnfei3lbTJ6(6~!B&^Z|aw##TM!;GSLg3Y2#e%&>pQp#rE{7=Z5e0UpV% zMCtH70AtJ=R8<YsV1+ll89+o%Ko?+1P{atZ&=|AOJ`YP6rxNaY^x&pw94#W7+vkev z`pggsdoh5B^Z~9;5yfSIMvVaO7oSvMQVG|M#xZIw^g!L>V2pVNxX=FehVKY)7U}NI z7r_8qipci%c~-(Wm2jU!*9B$3IOjQ-kHX9hAR?R4)|o@1XwLJ7ta)cZ#ZuS3sOPa- zcm&<<x$(+?kygZxv0H*5@Ywc!lk{7fTb%ew{Qrfbxme#l=vUobCESa^P#dlfZS@$+ zK<9?qwtL9|P<81nQn0B`8hQEksYX9>^6rgZEO`P|Q=5t24C?8Gi4(mRP0yEw0ltv2 z0&|=+?r3o1wV+d0O^1#sbDvLn4OV*{|ArC-9i1`WK<D|zjA>*=S5!niqnfEzYpn8d z;K!8LVD-5AL6RerK7fcULM>%x!BAt&Vi7qAHT6;ymZCZf^U*Vdf1)jemK96UHVm_f z&M^EB$8QKb*`~7z*>A*lbQ)3Q6mW2cI4(v57<G&^+cT|>iZP)Q%EABxJo9uJ==Yv! zbyOS@DxoY4;A_vnNkm52=Q~g}u|{J(s&X|8Ra<`=y{Xek;gk>d6Ok~dlo{3lArv`o zb<(>#Kzd2&CE%y1zrk32LR8!55OlZD+@Nx0r7>yyE{Gfe_)CDozXxn$)BBg48)`0a zc!qikYPBPJfwL_1<DwYg=|B}Y+@{x+e4IpnfQqZTq6bf3L<K>+rL1oc^tyHy{r)`Z z$)XtG)<6}w(MdDvY}uDy$LjZ?%9PEK_j5_9O^i+rMfoU>qjgldI+r&CoEfMBuhA-q zni#NQUaE91x?qhOf~wHNq;$=S-sxWysGK1v_0$%nEW3apiU_D4LB%@v6M@ov2UY5< zIBUKL-RazfP64|D-$w;d2cxcD62lntDr!@BO`!7n!hbuMVFc(!xJ#JF*)#_QNNXK% zNTjTbfWu<yFb3W7tp+yD&<4j)j>DqAHGB%N4G_w@=iWBGApz2w6vL?VYt&(yjdyIu zHn_6{46qhY593)GV4px0s2GbH;hD}VVCzU3ds5@#1o{;l9OFzW+h7OEah9>I4+CU6 z4mQTj!r#8%Tw}~X?6dD&c9m)M)CqtwX00*i<r;COpeJibSoOA4FvcuE*A_*i$tSXp zQs{S3m8q;a13q@He4<A>p!Ne&!5Fh1?Z7^$ErTp*q>;;NX!41inE{M3D^W|=D>FpD z-568RYd;%ZooB^!rd97hEf(3oU(OhRHoBcH5=~yQy;qSs7gn<e5J&f5tzV!v0evr9 zW)g{_SH>z5$W=J{fGN|dbsfGDbaTVk050rYI0Cq)PSCZ$nZ}s0#+X(1w@LV4yqK3U z-j8V20P2g%2^yJyC^UJ+_Wb&zrrdT%1ugfZQ^N}Td>*ii6Rr>8#J>k;DEFRhYzaKm zmxN9qMUDV}_v%AW2G|}oW424oyDm`%vA^#}Si=fCr7Uw7HnvZ=0-X+OY7AFNFNrO` zJjqKI;5!8fdNK4l5xH7KK31wU#%wT^VM3&<hzu8z%g|e`J9y^nVtvZ+6Hz%v1^<hB z@fwIKhUT4rX!Ic6^}M$5907J@V~$*kDvewOT!CJ-^6`mNj}A&v-u|?jtTpHYbO@@a zXn>0|w87XM>z0)E&)SE+Uc=%>kinLY@=QA^2B!#n6|GJk0j@A=vhEFZCvXI6fiw+# zOu>ah=6>{@0?OcdG?C{_5g84f<owi(G6Y8L4n73zB_e4U3Um}K8kwh|PXYrRUN3-% zbVv8=F3vWpnqI*J=$htVQ|8~Ok**dxGz07{BJ~zQ-$#7~RWRKc^M^>7spt{!_@o(& z$nJz)&}K!4W`K(FX8cQ$CiLcS1uf_~MjIGCn0gA>Lqra&lGffL;*JnO@9B9UvFY56 z;JFLfh2mGh1~oh1w@MkOM8aNEqdwoTVV)&MbsXK@TwtFE(s-MJ)hP3kurCAjpgc~V zu81k$F_AFKaIA30gzrnMUBIcd>K67v9Zi1h=MOdBTy&icj{W6^Gk|S~IVETWgQ|h= z<&>)z8+#?K>s$fd8C1e=KyMFM99X@Eo?RS7dDO&T_3FO>3~*Zs8lgf<uzm$lbM5ZC z*(CT<&^`5oF=?+s?IJW$+tW#-X@*b#g>WA~2X%*125bx5CnATVf*n_=bFWEor{1Vc z;4l#x1{?|Oi#mk91vMx0F#h)=Lt>#<>;NOc!4&@$MCk=!d*8Z6>bV>FTL;fVrx!g1 zY*B(nh@<6r`qOdhcp~u*8_GaC6v_a$fs(p_FM|F=9mh^J>NN_L4HR96YUH&5G$za% z0Ca&h#3TNCbS?21`laoR-Wu-hUo^%5vqj|3z<sEh)v7*#tO2QGQHR!{3`MR))#l!` z)C)KewMpzFOnb<;U_qQlWpDsh3ooFCBYuNw?u<oO-=C@#DJ2%61|i-=kB7HJPxS_& z3&{{z1>B4ZqMkrKnw^eLCy5TQ65tqP%w(?=0!;zki1&r-L+@aH=AZ(a%V{4DrPreR zkz3lb_aYz16AMY{A}6;sfUW4|IW_1sTFti(LFEo*xR)14Q3u!ulHbnZ+d=v*AOmbi zeqZQnU|%P%qbSF<ESLU*b3F|`rq08Ym_g+csV}wW$^f>~m*v>Ni?PFM37Oy-tjQZ& zwtaIh+Xcb;EHDG~LUjW3s`!IA;@pxj!8<rYCv-u%B**-k31Ar{7Y48mFfQi?KPQsk z`2{n;*hqP<&oQqS;DDh06`BETBm6qYMp%NQzmIMYR~OXzb0YQbn{!z%3f@;aF+fl9 zm7tA`<oAn$7+_qa9H-=%*JI@1FF6;LE@RAERFd{)9_gc!Iv4**<1c8ujb18ou}@sU z0C*8N!RVFtpvX<9&lvMMDobz9A^A29ZH#HA)z43(Fx_nI#y*sU&&5;di1&I9X$LzC zh=noc6%pAVy&$@Gz@+2O^{+!moPOxK!2R2gFm*Mk1nx!Dcw~}t`CuBl$jr?uS&*}U zx|xXdLM3=U?#`B=#;GO)j~ZjvWhg@&bM!_9HfyR7=t$WGc*_{`evLeOqK8jMqsk;% z9Z;-C4RW55ww`Ix5C-@-Gj+-G4OEGw)=5|kdRuo9s(~}v7*o&PTd5!-0(>52hS8{` zbRcTFHV%~&(HX!Ec3R6F4P}5f8LNZlp{U@bqGGiK6(qf3Lb*gK5k#abdg3?)J#}nB zucog+UEIFc@G=#}0G%iY%5bx%69uA^0XjH38K8rslL0z7IvJpYqmuzTIQ}1U+}%<$ S1(h=Z0000<MNUMnLSTX;hnoig literal 0 HcmV?d00001 From 9256bc0874c1f5ee4e47857bad16287531cef63c Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Thu, 26 Feb 2015 22:59:03 +0100 Subject: [PATCH 33/52] Update devel doc --- devel/codox/cats.builtin.html | 2 +- devel/codox/cats.core.html | 12 +- devel/codox/cats.data.html | 2 +- devel/codox/cats.monad.channel.html | 5 + devel/codox/cats.monad.continuation.html | 2 +- devel/codox/cats.monad.either.html | 2 +- devel/codox/cats.monad.exception.html | 2 +- devel/codox/cats.monad.html | 2 +- devel/codox/cats.monad.identity.html | 2 +- devel/codox/cats.monad.maybe.html | 2 +- devel/codox/cats.monad.reader.html | 2 +- devel/codox/cats.monad.state.html | 2 +- devel/codox/cats.monad.writer.html | 2 +- devel/codox/cats.protocols.html | 2 +- devel/codox/index.html | 2 +- devel/index.html | 135 ++++++++++++++++------- 16 files changed, 123 insertions(+), 55 deletions(-) create mode 100644 devel/codox/cats.monad.channel.html diff --git a/devel/codox/cats.builtin.html b/devel/codox/cats.builtin.html index b69c249..73e1832 100644 --- a/devel/codox/cats.builtin.html +++ b/devel/codox/cats.builtin.html @@ -1,3 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. </pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.core.html b/devel/codox/cats.core.html index 040b43f..001be61 100644 --- a/devel/codox/cats.core.html +++ b/devel/codox/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context"><div class="inner"><span>get-current-context</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure </pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. </pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. </pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. @@ -42,7 +42,8 @@ (maybe/just v) (maybe/nothing)))) ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-get-current-context"><h3>get-current-context</h3><div class="usage"><code>(get-current-context)</code><code>(get-current-context default)</code></div><div class="doc"><pre class="plaintext">Get current context or obtain it from +the provided instance.</pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. </pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a monadic context. @@ -115,13 +116,13 @@ b [(just (inc a))]] (return (* b 2))) ;=> [#<Just [4]> #<Just [6]>] -</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in default/effect free context. This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With pure/2, you can force a specific context -value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. </pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context. @@ -137,4 +138,5 @@ Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext">Set current context to specific monad. +</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.data.html b/devel/codox/cats.data.html index 7cc6f61..3adf7fe 100644 --- a/devel/codox/cats.data.html +++ b/devel/codox/cats.data.html @@ -1,4 +1,4 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. </pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. </pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.channel.html b/devel/codox/cats.monad.channel.html new file mode 100644 index 0000000..435276f --- /dev/null +++ b/devel/codox/cats.monad.channel.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.channel documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.channel.html#var-channel-monad"><div class="inner"><span>channel-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-promise"><div class="inner"><span>promise</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-promise-buffer"><div class="inner"><span>promise-buffer</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-then"><div class="inner"><span>then</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-with-value"><div class="inner"><span>with-value</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.channel</h2><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-channel-monad"><h3>channel-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-promise"><h3>promise</h3><div class="usage"><code>(promise)</code><code>(promise v)</code></div><div class="doc"><pre class="plaintext">Promise constructor. +</pre></div></div><div class="public anchor" id="var-promise-buffer"><h3>promise-buffer</h3><div class="usage"><code>(promise-buffer)</code><code>(promise-buffer v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-then"><h3>then</h3><div class="usage"><code>(then p handler)</code></div><div class="doc"><pre class="plaintext">Chain promise, mainly usefull if you do not want use +the go macro as sugar sintax.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><h4 class="type">macro</h4><div class="usage"><code>(when & promises)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-with-value"><h3>with-value</h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><pre class="plaintext">Simple helper that creates a channel and attach +an value to it.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.continuation.html b/devel/codox/cats.monad.continuation.html index 7ad219b..88a559f 100644 --- a/devel/codox/cats.monad.continuation.html +++ b/devel/codox/cats.monad.continuation.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. </pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. </pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. </pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the diff --git a/devel/codox/cats.monad.either.html b/devel/codox/cats.monad.either.html index 9d4a9e0..772d480 100644 --- a/devel/codox/cats.monad.either.html +++ b/devel/codox/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. </pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. </pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. </pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. diff --git a/devel/codox/cats.monad.exception.html b/devel/codox/cats.monad.exception.html index d0d5be1..a44472f 100644 --- a/devel/codox/cats.monad.exception.html +++ b/devel/codox/cats.monad.exception.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. The Try type represents a computation that may either result in an exception, or return a successfully computed value. It's similar to, but semantically diff --git a/devel/codox/cats.monad.html b/devel/codox/cats.monad.html index 180d274..53b2fe9 100644 --- a/devel/codox/cats.monad.html +++ b/devel/codox/cats.monad.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.identity.html b/devel/codox/cats.monad.identity.html index fd49b6a..4fdcea4 100644 --- a/devel/codox/cats.monad.identity.html +++ b/devel/codox/cats.monad.identity.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. </pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. </pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. </pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.maybe.html b/devel/codox/cats.monad.maybe.html index 0a07f35..7d17c48 100644 --- a/devel/codox/cats.monad.maybe.html +++ b/devel/codox/cats.monad.maybe.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. </pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. </pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. </pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. diff --git a/devel/codox/cats.monad.reader.html b/devel/codox/cats.monad.reader.html index 5d28e2a..6a14ee2 100644 --- a/devel/codox/cats.monad.reader.html +++ b/devel/codox/cats.monad.reader.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. </pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. </pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function to Reader class instance. diff --git a/devel/codox/cats.monad.state.html b/devel/codox/cats.monad.state.html index 0c1496c..a3e318d 100644 --- a/devel/codox/cats.monad.state.html +++ b/devel/codox/cats.monad.state.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. </pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. </pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the wrapped computation and return the resultant diff --git a/devel/codox/cats.monad.writer.html b/devel/codox/cats.monad.writer.html index c38c27e..83b2f70 100644 --- a/devel/codox/cats.monad.writer.html +++ b/devel/codox/cats.monad.writer.html @@ -1,3 +1,3 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. </pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.protocols.html b/devel/codox/cats.protocols.html index ec2d5f7..31b9a62 100644 --- a/devel/codox/cats.protocols.html +++ b/devel/codox/cats.protocols.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. </pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. diff --git a/devel/codox/index.html b/devel/codox/index.html index 2ac541d..17b6d16 100644 --- a/devel/codox/index.html +++ b/devel/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.4.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.4.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.4.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.4.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.channel.html">cats.monad.channel</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.channel.html#var-channel-monad">channel-monad</a> </li><li> <a href="cats.monad.channel.html#var-promise">promise</a> </li><li> <a href="cats.monad.channel.html#var-promise-buffer">promise-buffer</a> </li><li> <a href="cats.monad.channel.html#var-then">then</a> </li><li> <a href="cats.monad.channel.html#var-when">when</a> </li><li> <a href="cats.monad.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/devel/index.html b/devel/index.html index b362a50..dbb3663 100644 --- a/devel/index.html +++ b/devel/index.html @@ -512,10 +512,11 @@ <h1>Cats Documentation</h1> <li><a href="#_either">5.2. Either</a></li> <li><a href="#_try">5.3. Try</a></li> <li><a href="#_state">5.4. State</a></li> -<li><a href="#_reader">5.5. Reader</a></li> -<li><a href="#_writer">5.6. Writer</a></li> -<li><a href="#_continuation">5.7. Continuation</a></li> -<li><a href="#_vector">5.8. Vector</a></li> +<li><a href="#_channel">5.5. Channel</a></li> +<li><a href="#_reader">5.6. Reader</a></li> +<li><a href="#_writer">5.7. Writer</a></li> +<li><a href="#_continuation">5.8. Continuation</a></li> +<li><a href="#_vector">5.9. Vector</a></li> </ul> </li> <li><a href="#_faq">6. FAQ</a> @@ -723,7 +724,8 @@ <h3 id="_functor">4.1. Functor</h3> It is a safe substitute for <code>nil</code> and may represent failure.</p> </div> <div class="paragraph"> -<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> instance:</p> +<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> +instance:</p> </div> <div class="listingblock"> <div class="title">Example using fmap over <strong>nothing</strong>.</div> @@ -766,7 +768,7 @@ <h3 id="_functor">4.1. Functor</h3> <h3 id="_applicative">4.2. Applicative</h3> <div class="paragraph"> <p>Let’s continue with applicative functors. The Applicative Functor represents -some sort of "computational context" like a plain Functor, but with abilty to +some sort of "computational context" like a plain Functor, but with ability to execute a function wrapped in the same context.</p> </div> <div class="paragraph"> @@ -921,7 +923,7 @@ <h3 id="_monad">4.3. Monad</h3> value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> </div> <div class="paragraph"> -<p>We now can compose any number of computations using monad <strong>*bind</strong> +<p>We now can compose any number of computations using monad <strong>bind</strong> functions. But observe what happens when the number of computations increases:</p> </div> <div class="listingblock"> @@ -1012,7 +1014,7 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad since we want the resulting type to be a stateful computation -that may fail: <code>s -> Maybe (a, s)</code>.</p> +that may fail: <code>s → Maybe (a, s)</code>.</p> </div> <div class="paragraph"> <p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with @@ -1146,18 +1148,6 @@ <h3 id="_maybe">5.1. Maybe</h3> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Maybe types are: Functors, Applicative Functors and Monads -</td> -</tr> -</table> -</div> </div> <div class="sect2"> <h3 id="_either">5.2. Either</h3> @@ -1255,18 +1245,6 @@ <h3 id="_try">5.3. Try</h3> <span class="tok-c1">;; => #<Success [0]></span></code></pre> </div> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Try is also (like Maybe) Functor, Applicative Functor and Monad. -</td> -</tr> -</table> -</div> </div> <div class="sect2"> <h3 id="_state">5.4. State</h3> @@ -1369,25 +1347,108 @@ <h3 id="_state">5.4. State</h3> </div> </div> <div class="sect2"> -<h3 id="_reader">5.5. Reader</h3> +<h3 id="_channel">5.5. Channel</h3> +<div class="paragraph"> +<p>In asynchronous environments with clojure and clojurescript we tend to use core.async, because it +is a very powerfull abstraction.</p> +</div> +<div class="paragraph"> +<p>It would be awesome to be able to work with channel as a monadic type, and combine it with error +monads for short-circuiting async computations that may fail.</p> +</div> +<div class="paragraph"> +<p>Let’s start using channel as a functor:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cljs.core.async</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">chan</span> <span class="tok-nv">put!</span> <span class="tok-nv"><!!</span><span class="tok-p">]])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.channel</span> <span class="tok-ss">:as</span> <span class="tok-nv">channel</span><span class="tok-p">])</span> + +<span class="tok-c1">;; Declare arbitrary channel with initial value</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">mychan</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-mi">2</span><span class="tok-p">))</span> + +<span class="tok-c1">;; Use channel as a functor</span> +<span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-nv">mychan</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 3</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The channel type also fulfills the monad abstraction, let see it in action:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">result</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-mi">2</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-mi">3</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> +<span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-nv">result</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 5</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>But the best of all is coming: combine the channel monad with error monads. It allows to build very concise +and simple asynchronous APIs. Let see how you can use it your application:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:as</span> <span class="tok-nv">either</span><span class="tok-p">])</span> + +<span class="tok-c1">;; Declare a monad transformer</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">either-chan-m</span> + <span class="tok-p">(</span><span class="tok-nf">either/either-transformer</span> <span class="tok-nv">channel/channel-monad</span><span class="tok-p">))</span> + +<span class="tok-c1">;; A success example</span> +<span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">either-chan-m</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/right</span> <span class="tok-mi">2</span><span class="tok-p">))</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/right</span> <span class="tok-mi">3</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> +<span class="tok-c1">;; => #<Right [5]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can see, the code looks very similar to the previos example, with the exception that +the value in a channel is not a simple plain value, is an either instance.</p> +</div> +<div class="paragraph"> +<p>Let’s see what happens if some computation fails in the mlet composition:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">either-chan-m</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/left</span> <span class="tok-s">"Some error"</span><span class="tok-p">))</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/right</span> <span class="tok-mi">3</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> +<span class="tok-c1">;; => #<Left [Some error]></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The result is the expected short-circuiting left, without unexpected nullpointer exceptions +or similar issues.</p> +</div> +<div class="paragraph"> +<p>With this compositional power, you can model your asynchronous API with a complete +error handling using any error monad (in this case Either).</p> +</div> +</div> +<div class="sect2"> +<h3 id="_reader">5.6. Reader</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_writer">5.6. Writer</h3> +<h3 id="_writer">5.7. Writer</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_continuation">5.7. Continuation</h3> +<h3 id="_continuation">5.8. Continuation</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_vector">5.8. Vector</h3> +<h3 id="_vector">5.9. Vector</h3> <div class="paragraph"> <p>TODO</p> </div> @@ -1563,7 +1624,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-02-21 12:07:49 CET +Last updated 2015-02-26 22:58:47 CET </div> </div> </body> From 7d9c8bfe33688464144ba4fc2425281ea4c0ffb2 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 14 Mar 2015 16:15:26 +0100 Subject: [PATCH 34/52] Update latest doc --- latest/codox/cats.builtin.html | 3 - latest/codox/cats.core.html | 140 ---------------------- latest/codox/cats.data.html | 4 - latest/codox/cats.monad.continuation.html | 6 - latest/codox/cats.monad.either.html | 8 -- latest/codox/cats.monad.exception.html | 14 --- latest/codox/cats.monad.html | 2 - latest/codox/cats.monad.identity.html | 5 - latest/codox/cats.monad.lazy.html | 3 - latest/codox/cats.monad.maybe.html | 16 --- latest/codox/cats.monad.reader.html | 10 -- latest/codox/cats.monad.state.html | 31 ----- latest/codox/cats.monad.writer.html | 3 - latest/codox/cats.protocols.html | 28 ----- latest/codox/index.html | 2 +- latest/index.html | 8 +- 16 files changed, 5 insertions(+), 278 deletions(-) delete mode 100644 latest/codox/cats.builtin.html delete mode 100644 latest/codox/cats.core.html delete mode 100644 latest/codox/cats.data.html delete mode 100644 latest/codox/cats.monad.continuation.html delete mode 100644 latest/codox/cats.monad.either.html delete mode 100644 latest/codox/cats.monad.exception.html delete mode 100644 latest/codox/cats.monad.html delete mode 100644 latest/codox/cats.monad.identity.html delete mode 100644 latest/codox/cats.monad.lazy.html delete mode 100644 latest/codox/cats.monad.maybe.html delete mode 100644 latest/codox/cats.monad.reader.html delete mode 100644 latest/codox/cats.monad.state.html delete mode 100644 latest/codox/cats.monad.writer.html delete mode 100644 latest/codox/cats.protocols.html diff --git a/latest/codox/cats.builtin.html b/latest/codox/cats.builtin.html deleted file mode 100644 index 95647fe..0000000 --- a/latest/codox/cats.builtin.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. -</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.core.html b/latest/codox/cats.core.html deleted file mode 100644 index b20081d..0000000 --- a/latest/codox/cats.core.html +++ /dev/null @@ -1,140 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. -</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. -</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. -Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the -arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, -ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. - -Example: - (>>= (just 1) (comp just inc) (comp just inc)) - ;=> #<Just [3]> -</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside -av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, -returning the identity element when the predicate yields false. - -Otherwise, returns the instance unchanged. - - (require '[cats.monad.moaybe :as maybe]) - (require '[cats.core :as m]) - - (m/filter (partial < 2) (maybe/just 3)) - ;=> <Just [3]> - - (m/filter (partial < 4) (maybe/just 3)) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. - -(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(m/forseq [2 3] maybe/just) -;=> <Just [[2 3]]> - -(m/forseq [1 2] - (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing)))) -;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value -of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a -monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (def monad+ (m/lift-m 2 +)) - - (monad+ (maybe/just 1) (maybe/just 2)) - ;=> <Just [3]> - - (monad+ (maybe/just 1) (maybe/nothing)) - ;=> <Nothing> - - (monad+ [0 2 4] [1 2]) - ;=> [1 2 3 4 5 6] -</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a -monadic context, map it into the given collection -calling sequence on the results. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/mapseq maybe/just [2 3]) - ;=> <Just [[2 3]]> - - (m/mapseq (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing))) - [1 2]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure -let. This allows much easy composition of monadic -computations. - -Let see one example for understand how it works, this is -a code using bind for compose few number of operations: - - - (bind (just 1) - (fn [a] - (bind (just (inc a)) - (fn [b] - (return (* b 2)))))) - ;=> #<Just [4]> - -Now see how this code can be more clear if you -are using mlet macro for do it: - - (mlet [a (just 1) - b (just (inc a))] - (return (* b 2))) - ;=> #<Just [4]> -</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the -same as mlet but specifying the monadic context. -So, instead of writing: - - (with-monad (maybe-transformer vector-monad) - (mlet [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2)))) - ;=> [#<Just [4]> #<Just [6]>] - -You can just write: - - (mlet-with (maybe-transformer vector-monad) - [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2))) - ;=> [#<Just [4]> #<Just [6]>] -</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in -default/effect free context. - -This is multiarity function that with arity pure/1 -it uses the dynamic scope to resolve the current -context. With pure/2, you can force a specific context -value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. -</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect -their values in a vector returned in the monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/sequence [(maybe/just 2) (maybe/just 3)]) - ;=> <Just [[2, 3]]> - - (m/sequence [(maybe/nothing) (maybe/just 3)]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.data.html b/latest/codox/cats.data.html deleted file mode 100644 index 2fc8cd8..0000000 --- a/latest/codox/cats.data.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. -</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. -</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.continuation.html b/latest/codox/cats.monad.continuation.html deleted file mode 100644 index ea0bf80..0000000 --- a/latest/codox/cats.monad.continuation.html +++ /dev/null @@ -1,6 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. -</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. -</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.either.html b/latest/codox/cats.monad.either.html deleted file mode 100644 index 2390823..0000000 --- a/latest/codox/cats.monad.either.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. -</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. -</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. -</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.exception.html b/latest/codox/cats.monad.exception.html deleted file mode 100644 index ba99e6a..0000000 --- a/latest/codox/cats.monad.exception.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. - -The Try type represents a computation that may either result in an exception, -or return a successfully computed value. It's similar to, but semantically -different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. -</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. -</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. -</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. - -Is a high order function that accept a function -as parameter and returns an other that returns -success or failure depending of result of the -first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.html b/latest/codox/cats.monad.html deleted file mode 100644 index b83623b..0000000 --- a/latest/codox/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.identity.html b/latest/codox/cats.monad.identity.html deleted file mode 100644 index 567ade2..0000000 --- a/latest/codox/cats.monad.identity.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. -</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. -</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. -</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.lazy.html b/latest/codox/cats.monad.lazy.html deleted file mode 100644 index b16e01b..0000000 --- a/latest/codox/cats.monad.lazy.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. -</pre></div><div class="public anchor" id="var-lazy-monad"><h3>lazy-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lazy-transformer"><h3>lazy-transformer</h3><div class="usage"><code>(lazy-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.maybe.html b/latest/codox/cats.monad.maybe.html deleted file mode 100644 index dd4e766..0000000 --- a/latest/codox/cats.monad.maybe.html +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. -</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. -</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. - -Examples: - (from-maybe (just 1)) - ;=> 1 - (from-maybe (just 1) 42) - ;=> 1 - (from-maybe (nothing)) - ;=> nil - (from-maybe (nothing) 42) - ;=> 42 -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.reader.html b/latest/codox/cats.monad.reader.html deleted file mode 100644 index efaf977..0000000 --- a/latest/codox/cats.monad.reader.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. -</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. -</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function -to Reader class instance. -Reader class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the -wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.state.html b/latest/codox/cats.monad.state.html deleted file mode 100644 index 8ad8993..0000000 --- a/latest/codox/cats.monad.state.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. -</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. -</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -value, ignoring the state. -Equivalent to taking the first value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -state. -Equivalent to taking the second value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces -the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and returns a cats.data.Pair -instance with result and new state. - - (def computation (mlet [x (get-state) - y (put-state (inc x))] - (return y))) - - (def initial-state 1) - (run-state computation initial-state) - -This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function -to State class instance. -State class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the -specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.writer.html b/latest/codox/cats.monad.writer.html deleted file mode 100644 index 43b8805..0000000 --- a/latest/codox/cats.monad.writer.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. -</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.protocols.html b/latest/codox/cats.protocols.html deleted file mode 100644 index 6b8e7a0..0000000 --- a/latest/codox/cats.protocols.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. -</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) -inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. -</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. -</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. -</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state -and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. -</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. -</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. -</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. -</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, -yield a writer which has the first element of the pair as the value and -the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. -</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/index.html b/latest/codox/index.html index 9e70cca..529a058 100644 --- a/latest/codox/index.html +++ b/latest/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.3 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.3 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.3</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></div></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 171708c..e5077a0 100644 --- a/latest/index.html +++ b/latest/index.html @@ -480,7 +480,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.3.2</span> +<span id="revdate">0.3.3</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -597,7 +597,7 @@ <h3 id="_leiningen">3.1. Leiningen</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.2"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.3"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> @@ -622,7 +622,7 @@ <h3 id="_maven">3.2. Maven</h3> <pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.3.2<span class="tok-nt"></version></span> + <span class="tok-nt"><version></span>0.3.3<span class="tok-nt"></version></span> <span class="tok-nt"></dependency></span></code></pre> </div> </div> @@ -1563,7 +1563,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-02-21 11:57:07 CET +Last updated 2015-03-14 16:14:18 CET </div> </div> </body> From b84eb4eb00f5c9572fb8ad024373dfb6c34dc336 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sat, 14 Mar 2015 16:39:07 +0100 Subject: [PATCH 35/52] Update latest doc --- latest/codox/cats.builtin.html | 3 + latest/codox/cats.core.html | 140 ++++++++++++++++++++++ latest/codox/cats.data.html | 4 + latest/codox/cats.monad.continuation.html | 6 + latest/codox/cats.monad.either.html | 8 ++ latest/codox/cats.monad.exception.html | 14 +++ latest/codox/cats.monad.html | 2 + latest/codox/cats.monad.identity.html | 5 + latest/codox/cats.monad.maybe.html | 16 +++ latest/codox/cats.monad.reader.html | 10 ++ latest/codox/cats.monad.state.html | 31 +++++ latest/codox/cats.monad.writer.html | 3 + latest/codox/cats.protocols.html | 28 +++++ latest/codox/index.html | 2 +- latest/index.html | 8 +- 15 files changed, 275 insertions(+), 5 deletions(-) create mode 100644 latest/codox/cats.builtin.html create mode 100644 latest/codox/cats.core.html create mode 100644 latest/codox/cats.data.html create mode 100644 latest/codox/cats.monad.continuation.html create mode 100644 latest/codox/cats.monad.either.html create mode 100644 latest/codox/cats.monad.exception.html create mode 100644 latest/codox/cats.monad.html create mode 100644 latest/codox/cats.monad.identity.html create mode 100644 latest/codox/cats.monad.maybe.html create mode 100644 latest/codox/cats.monad.reader.html create mode 100644 latest/codox/cats.monad.state.html create mode 100644 latest/codox/cats.monad.writer.html create mode 100644 latest/codox/cats.protocols.html diff --git a/latest/codox/cats.builtin.html b/latest/codox/cats.builtin.html new file mode 100644 index 0000000..c8d00df --- /dev/null +++ b/latest/codox/cats.builtin.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. +</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.core.html b/latest/codox/cats.core.html new file mode 100644 index 0000000..563c3b1 --- /dev/null +++ b/latest/codox/cats.core.html @@ -0,0 +1,140 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure +</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. +</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. +</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. +Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the +arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. +</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, +ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. + +Example: + (>>= (just 1) (comp just inc) (comp just inc)) + ;=> #<Just [3]> +</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, +applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside +av's context, applies the function to value and return +a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, +returning the identity element when the predicate yields false. + +Otherwise, returns the instance unchanged. + + (require '[cats.monad.moaybe :as maybe]) + (require '[cats.core :as m]) + + (m/filter (partial < 2) (maybe/just 3)) + ;=> <Just [3]> + + (m/filter (partial < 4) (maybe/just 3)) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv +preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. + +(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(m/forseq [2 3] maybe/just) +;=> <Just [[2 3]]> + +(m/forseq [1 2] + (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing)))) +;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value +of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a +monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (def monad+ (m/lift-m 2 +)) + + (monad+ (maybe/just 1) (maybe/just 2)) + ;=> <Just [3]> + + (monad+ (maybe/just 1) (maybe/nothing)) + ;=> <Nothing> + + (monad+ [0 2 4] [1 2]) + ;=> [1 2 3 4 5 6] +</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a +monadic context, map it into the given collection +calling sequence on the results. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/mapseq maybe/just [2 3]) + ;=> <Just [[2 3]]> + + (m/mapseq (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing))) + [1 2]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure +let. This allows much easy composition of monadic +computations. + +Let see one example for understand how it works, this is +a code using bind for compose few number of operations: + + + (bind (just 1) + (fn [a] + (bind (just (inc a)) + (fn [b] + (return (* b 2)))))) + ;=> #<Just [4]> + +Now see how this code can be more clear if you +are using mlet macro for do it: + + (mlet [a (just 1) + b (just (inc a))] + (return (* b 2))) + ;=> #<Just [4]> +</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the +same as mlet but specifying the monadic context. +So, instead of writing: + + (with-monad (maybe-transformer vector-monad) + (mlet [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2)))) + ;=> [#<Just [4]> #<Just [6]>] + +You can just write: + + (mlet-with (maybe-transformer vector-monad) + [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2))) + ;=> [#<Just [4]> #<Just [6]>] +</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in +default/effect free context. + +This is multiarity function that with arity pure/1 +it uses the dynamic scope to resolve the current +context. With pure/2, you can force a specific context +value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. +</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect +their values in a vector returned in the monadic context. + + (require '[cats.monad.maybe :as maybe]) + (require '[cats.core :as m]) + + (m/sequence [(maybe/just 2) (maybe/just 3)]) + ;=> <Just [[2, 3]]> + + (m/sequence [(maybe/nothing) (maybe/just 3)]) + ;=> <Nothing> +</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. + +Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.data.html b/latest/codox/cats.data.html new file mode 100644 index 0000000..3e8e4d6 --- /dev/null +++ b/latest/codox/cats.data.html @@ -0,0 +1,4 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. +</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. +</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.continuation.html b/latest/codox/cats.monad.continuation.html new file mode 100644 index 0000000..4a55a28 --- /dev/null +++ b/latest/codox/cats.monad.continuation.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. +</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. +</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. +</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the +wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.either.html b/latest/codox/cats.monad.either.html new file mode 100644 index 0000000..a1d9159 --- /dev/null +++ b/latest/codox/cats.monad.either.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. +</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. +</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. +</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. +</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. +</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. +</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.exception.html b/latest/codox/cats.monad.exception.html new file mode 100644 index 0000000..07ad0aa --- /dev/null +++ b/latest/codox/cats.monad.exception.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. + +The Try type represents a computation that may either result in an exception, +or return a successfully computed value. It's similar to, but semantically +different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. +</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. +</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. +</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. + +Is a high order function that accept a function +as parameter and returns an other that returns +success or failure depending of result of the +first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.html b/latest/codox/cats.monad.html new file mode 100644 index 0000000..9d4a6ae --- /dev/null +++ b/latest/codox/cats.monad.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.identity.html b/latest/codox/cats.monad.identity.html new file mode 100644 index 0000000..be4ea53 --- /dev/null +++ b/latest/codox/cats.monad.identity.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. +</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. +</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. +</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.maybe.html b/latest/codox/cats.monad.maybe.html new file mode 100644 index 0000000..2326659 --- /dev/null +++ b/latest/codox/cats.monad.maybe.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. +</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. +</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. +</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. + +Examples: + (from-maybe (just 1)) + ;=> 1 + (from-maybe (just 1) 42) + ;=> 1 + (from-maybe (nothing)) + ;=> nil + (from-maybe (nothing) 42) + ;=> 42 +</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.reader.html b/latest/codox/cats.monad.reader.html new file mode 100644 index 0000000..0b2941c --- /dev/null +++ b/latest/codox/cats.monad.reader.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. +</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. +</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function +to Reader class instance. +Reader class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the +wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.state.html b/latest/codox/cats.monad.state.html new file mode 100644 index 0000000..1e80032 --- /dev/null +++ b/latest/codox/cats.monad.state.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. +</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. +</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +value, ignoring the state. +Equivalent to taking the first value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and return the resultant +state. +Equivalent to taking the second value of the pair instance +returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns +the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces +the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the +wrapped computation and returns a cats.data.Pair +instance with result and new state. + + (def computation (mlet [x (get-state) + y (put-state (inc x))] + (return y))) + + (def initial-state 1) + (run-state computation initial-state) + +This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function +to State class instance. +State class instance work as simple wrapper +for standard clojure function, just for avoid +extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of +State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the +specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.writer.html b/latest/codox/cats.monad.writer.html new file mode 100644 index 0000000..f55597f --- /dev/null +++ b/latest/codox/cats.monad.writer.html @@ -0,0 +1,3 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. +</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.protocols.html b/latest/codox/cats.protocols.html new file mode 100644 index 0000000..ffc90cc --- /dev/null +++ b/latest/codox/cats.protocols.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. +</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) +inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts +the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. +</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. +</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. +</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. +</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state +and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. +</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. +</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. +</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. +</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. +</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, +yield a writer which has the first element of the pair as the value and +the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. +</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. +</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. +</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/index.html b/latest/codox/index.html index 529a058..ecbfa8d 100644 --- a/latest/codox/index.html +++ b/latest/codox/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.3 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.3 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.3</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.4 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.4</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index e5077a0..4faf2c7 100644 --- a/latest/index.html +++ b/latest/index.html @@ -480,7 +480,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.3.3</span> +<span id="revdate">0.3.4</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -597,7 +597,7 @@ <h3 id="_leiningen">3.1. Leiningen</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.3"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.4"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> @@ -622,7 +622,7 @@ <h3 id="_maven">3.2. Maven</h3> <pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.3.3<span class="tok-nt"></version></span> + <span class="tok-nt"><version></span>0.3.4<span class="tok-nt"></version></span> <span class="tok-nt"></dependency></span></code></pre> </div> </div> @@ -1563,7 +1563,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-03-14 16:14:18 CET +Last updated 2015-03-14 16:38:38 CET </div> </div> </body> From 373f036d146e8207eeb03177734fc689ac5645d0 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 22 Mar 2015 00:36:34 +0100 Subject: [PATCH 36/52] Update devel doc --- devel/codeina/cats.builtin.html | 2 + devel/codeina/cats.core.html | 71 +++++ devel/codeina/cats.data.html | 2 + devel/codeina/cats.monad.channel.html | 2 + devel/codeina/cats.monad.continuation.html | 2 + devel/codeina/cats.monad.either.html | 2 + devel/codeina/cats.monad.exception.html | 2 + .../cats.monad.html} | 4 +- devel/codeina/cats.monad.identity.html | 2 + devel/codeina/cats.monad.maybe.html | 11 + devel/codeina/cats.monad.reader.html | 2 + devel/codeina/cats.monad.state.html | 2 + devel/codeina/cats.monad.writer.html | 2 + devel/codeina/cats.protocols.html | 2 + devel/{codox => codeina}/css/default.css | 263 +++++++++--------- devel/codeina/index.html | 2 + devel/{codox => codeina}/js/jquery.min.js | 0 devel/{codox => codeina}/js/page_effects.js | 0 devel/codox/cats.builtin.html | 3 - devel/codox/cats.core.html | 142 ---------- devel/codox/cats.monad.channel.html | 5 - devel/codox/cats.monad.continuation.html | 6 - devel/codox/cats.monad.either.html | 8 - devel/codox/cats.monad.exception.html | 14 - devel/codox/cats.monad.html | 2 - devel/codox/cats.monad.identity.html | 5 - devel/codox/cats.monad.maybe.html | 16 -- devel/codox/cats.monad.reader.html | 10 - devel/codox/cats.monad.state.html | 31 --- devel/codox/cats.monad.writer.html | 3 - devel/codox/cats.protocols.html | 28 -- devel/codox/index.html | 2 - devel/index.html | 4 +- 33 files changed, 234 insertions(+), 418 deletions(-) create mode 100644 devel/codeina/cats.builtin.html create mode 100644 devel/codeina/cats.core.html create mode 100644 devel/codeina/cats.data.html create mode 100644 devel/codeina/cats.monad.channel.html create mode 100644 devel/codeina/cats.monad.continuation.html create mode 100644 devel/codeina/cats.monad.either.html create mode 100644 devel/codeina/cats.monad.exception.html rename devel/{codox/cats.data.html => codeina/cats.monad.html} (59%) create mode 100644 devel/codeina/cats.monad.identity.html create mode 100644 devel/codeina/cats.monad.maybe.html create mode 100644 devel/codeina/cats.monad.reader.html create mode 100644 devel/codeina/cats.monad.state.html create mode 100644 devel/codeina/cats.monad.writer.html create mode 100644 devel/codeina/cats.protocols.html rename devel/{codox => codeina}/css/default.css (59%) create mode 100644 devel/codeina/index.html rename devel/{codox => codeina}/js/jquery.min.js (100%) rename devel/{codox => codeina}/js/page_effects.js (100%) delete mode 100644 devel/codox/cats.builtin.html delete mode 100644 devel/codox/cats.core.html delete mode 100644 devel/codox/cats.monad.channel.html delete mode 100644 devel/codox/cats.monad.continuation.html delete mode 100644 devel/codox/cats.monad.either.html delete mode 100644 devel/codox/cats.monad.exception.html delete mode 100644 devel/codox/cats.monad.html delete mode 100644 devel/codox/cats.monad.identity.html delete mode 100644 devel/codox/cats.monad.maybe.html delete mode 100644 devel/codox/cats.monad.reader.html delete mode 100644 devel/codox/cats.monad.state.html delete mode 100644 devel/codox/cats.monad.writer.html delete mode 100644 devel/codox/cats.protocols.html delete mode 100644 devel/codox/index.html diff --git a/devel/codeina/cats.builtin.html b/devel/codeina/cats.builtin.html new file mode 100644 index 0000000..40e7629 --- /dev/null +++ b/devel/codeina/cats.builtin.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.core.html b/devel/codeina/cats.core.html new file mode 100644 index 0000000..2b722ce --- /dev/null +++ b/devel/codeina/cats.core.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><div class="markdown"><p>Alias of fmap.</p></div></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative fapply.</p></div></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Example: (>>= (just 1) (comp just inc) (comp just inc)) ;=> #<Just [3]></p></div></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context mv and any function, applies a function to value of mv.</p></div></div></div><div class="public anchor" id="var-errlet"><h3><a href="#var-errlet">errlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s conext and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p></div></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> +<pre><code>(require '[cats.monad.moaybe :as maybe]) +(require '[cats.core :as m]) + +(m/filter (partial < 2) (maybe/just 3)) +;=> <Just [3]> + +(m/filter (partial < 4) (maybe/just 3)) +;=> <Nothing> +</code></pre></div></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>(require ‘[cats.monad.maybe :as maybe]) (require ’[cats.core :as m])</p><p>(m/forseq [2 3] maybe/just) ;=> <Just <a href="null">2 3</a>></p><p>(m/forseq [1 2] (fn [v] (if (odd? v) (maybe/just v) (maybe/nothing)))) ;=> <Nothing></p></div></div></div><div class="public anchor" id="var-get-current-context"><h3><a href="#var-get-current-context">get-current-context</a></h3><div class="usage"><code>(get-current-context)</code><code>(get-current-context default)</code></div><div class="doc"><div class="markdown"><p>Get current context or obtain it from the provided instance.</p></div></div></div><div class="public anchor" id="var-get-value"><h3><a href="#var-get-value">get-value</a></h3><div class="usage"><code>(get-value v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> +<pre><code>(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(def monad+ (m/lift-m 2 +)) + +(monad+ (maybe/just 1) (maybe/just 2)) +;=> <Just [3]> + +(monad+ (maybe/just 1) (maybe/nothing)) +;=> <Nothing> + +(monad+ [0 2 4] [1 2]) +;=> [1 2 3 4 5 6] +</code></pre></div></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> +<pre><code>(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(m/mapseq maybe/just [2 3]) +;=> <Just [[2 3]]> + +(m/mapseq (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing))) + [1 2]) +;=> <Nothing> +</code></pre></div></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> +<pre><code>(bind (just 1) + (fn [a] + (bind (just (inc a)) + (fn [b] + (return (* b 2)))))) +;=> #<Just [4]> +</code></pre><p>Now see how this code can be more clear if you are using mlet macro for do it:</p> +<pre><code>(mlet [a (just 1) + b (just (inc a))] + (return (* b 2))) +;=> #<Just [4]> +</code></pre></div></div></div><div class="public anchor" id="var-mlet-with"><h3><a href="#var-mlet-with">mlet-with</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><div class="markdown"><p>A helper macro for using monad transformers, is the same as mlet but specifying the monadic context. So, instead of writing:</p> +<pre><code>(with-monad (maybe-transformer vector-monad) + (mlet [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2)))) +;=> [#<Just [4]> #<Just [6]>] +</code></pre><p>You can just write:</p> +<pre><code>(mlet-with (maybe-transformer vector-monad) + [a [(just 1) (just 2)] + b [(just (inc a))]] + (return (* b 2))) +;=> [#<Just [4]> #<Just [6]>] +</code></pre></div></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p></div></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure.</p></div></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> +<pre><code>(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(m/sequence [(maybe/just 2) (maybe/just 3)]) +;=> <Just [[2, 3]]> + +(m/sequence [(maybe/nothing) (maybe/just 3)]) +;=> <Nothing> +</code></pre></div></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value.</p><p>Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value.</p><p>Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.data.html b/devel/codeina/cats.data.html new file mode 100644 index 0000000..e66ed94 --- /dev/null +++ b/devel/codeina/cats.data.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.channel.html b/devel/codeina/cats.monad.channel.html new file mode 100644 index 0000000..0d05ee4 --- /dev/null +++ b/devel/codeina/cats.monad.channel.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel-monad"><h3><a href="#var-channel-monad">channel-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.continuation.html b/devel/codeina/cats.monad.continuation.html new file mode 100644 index 0000000..4bc0ca7 --- /dev/null +++ b/devel/codeina/cats.monad.continuation.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.either.html b/devel/codeina/cats.monad.either.html new file mode 100644 index 0000000..b867c37 --- /dev/null +++ b/devel/codeina/cats.monad.either.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either (Error) Monad.</p></div></div><div class="public anchor" id="var-either-monad"><h3><a href="#var-either-monad">either-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-from-either"><h3><a href="#var-from-either">from-either</a></h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><div class="markdown"><p>Return inner value of either monad.</p></div></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>Left constructor for Either type.</p></div></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>Right constructor for Either type.</p></div></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.exception.html b/devel/codeina/cats.monad.exception.html new file mode 100644 index 0000000..04e115e --- /dev/null +++ b/devel/codeina/cats.monad.exception.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Try Monad.</p><p>The Try type represents a computation that may either result in an exception, or return a successfully computed value. It’s similar to, but semantically different from the Either type.</p></div></div><div class="public anchor" id="var-exception-monad"><h3><a href="#var-exception-monad">exception-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The exception monad type definition.</p></div></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? e)</code></div><div class="doc"><div class="markdown"><p>Check if provided parameter is an instance of exception or not.</p></div></div></div><div class="public anchor" id="var-exec-try-on"><h3><a href="#var-exec-try-on">exec-try-on</a></h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-exec-try-or-else"><h3><a href="#var-exec-try-or-else">exec-try-or-else</a></h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3><a href="#var-exec-try-or-recover">exec-try-or-recover</a></h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exceptio, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Check if a provided parameter is a failure instance.</p></div></div></div><div class="public anchor" id="var-from-failure"><h3><a href="#var-from-failure">from-failure</a></h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><div class="markdown"><p>Extract value from failure container without doing nothing.</p></div></div></div><div class="public anchor" id="var-from-success"><h3><a href="#var-from-success">from-success</a></h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><div class="markdown"><p>Extract value from success container without doing nothing.</p></div></div></div><div class="public anchor" id="var-from-try"><h3><a href="#var-from-try">from-try</a></h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Check if a provided parameter is a success instance</p></div></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try.3F"><h3><a href="#var-try.3F">try?</a></h3><div class="usage"><code>(try? v)</code></div><div class="doc"><div class="markdown"><p>Check if a provided parameter is instance of Try monad.</p></div></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codox/cats.data.html b/devel/codeina/cats.monad.html similarity index 59% rename from devel/codox/cats.data.html rename to devel/codeina/cats.monad.html index 3adf7fe..8a11e94 100644 --- a/devel/codox/cats.data.html +++ b/devel/codeina/cats.monad.html @@ -1,4 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. -</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. -</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.identity.html b/devel/codeina/cats.monad.identity.html new file mode 100644 index 0000000..f423edb --- /dev/null +++ b/devel/codeina/cats.monad.identity.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>Default constructor for identity type.</p></div></div></div><div class="public anchor" id="var-identity-monad"><h3><a href="#var-identity-monad">identity-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.maybe.html b/devel/codeina/cats.monad.maybe.html new file mode 100644 index 0000000..96fdca4 --- /dev/null +++ b/devel/codeina/cats.monad.maybe.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe Monad.</p></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad. Accepts an optional default value.</p><p>Let see some examples:</p> +<pre><code>(from-maybe (just 1)) +;=> 1 +(from-maybe (just 1) 42) +;=> 1 +(from-maybe (nothing)) +;=> nil +(from-maybe (nothing) 42) +;=> 42 +</code></pre></div></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-maybe-monad"><h3><a href="#var-maybe-monad">maybe-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.reader.html b/devel/codeina/cats.monad.reader.html new file mode 100644 index 0000000..b361d88 --- /dev/null +++ b/devel/codeina/cats.monad.reader.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>Transform a simple reader-monad function to Reader class instance. Reader class instance work as simple wrapper for standard clojure function, just for avoid extend plain function type of clojure.</p></div></div></div><div class="public anchor" id="var-reader-monad"><h3><a href="#var-reader-monad">reader-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Check if value s is instance of Reader type.</p></div></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.state.html b/devel/codeina/cats.monad.state.html new file mode 100644 index 0000000..c15b95b --- /dev/null +++ b/devel/codeina/cats.monad.state.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div></div><div class="public anchor" id="var-state-monad"><h3><a href="#var-state-monad">state-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>Transform a simple state-monad function to State class instance. State class instance work as simple wrapper for standard clojure function, just for avoid extend plain function type of clojure.</p></div></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Check if value s is instance of State type.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.monad.writer.html b/devel/codeina/cats.monad.writer.html new file mode 100644 index 0000000..04c9e77 --- /dev/null +++ b/devel/codeina/cats.monad.writer.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-writer-monad"><h3><a href="#var-writer-monad">writer-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codeina/cats.protocols.html b/devel/codeina/cats.protocols.html new file mode 100644 index 0000000..9254add --- /dev/null +++ b/devel/codeina/cats.protocols.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Cathegory theory types definition.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type that is part of a computational context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div><div class="public anchor" id="var-get-value"><h3><a href="#var-get-value">get-value</a></h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><div class="markdown"><p>Unwrap the value from context.</p></div></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>MonadZero</code> that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> with a read-only access to an environment value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"><code>(ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> formed by functions from states to a new state and a (poosibly monadic) value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> that accumulates a log.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for <code>ctx</code>.</p></div></div></div></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codox/css/default.css b/devel/codeina/css/default.css similarity index 59% rename from devel/codox/css/default.css rename to devel/codeina/css/default.css index fcabf4e..257ab2c 100644 --- a/devel/codox/css/default.css +++ b/devel/codeina/css/default.css @@ -1,138 +1,105 @@ +@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono:200,300,400); +@import url(http://fonts.googleapis.com/css?family=Lato:light,regular); +@import url(http://fonts.googleapis.com/css?family=Ubuntu:300,400,500); + body { - font-family: Helvetica, Arial, sans-serif; - font-size: 15px; + font-family: "Lato", Helvetica, Arial, sans-serif; + font-weight: 300; + color:#585858; + font-size: 100%; + margin: 0px; } pre, code { - font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; - font-size: 9pt; - margin: 15px 0; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-weight: 300; } -h2 { - font-weight: normal; - font-size: 28px; - padding: 10px 0 2px 0; - margin: 0; -} - -#header, #content, .sidebar { - position: fixed; -} - -#header { - top: 0; - left: 0; - right: 0; - height: 20px; - background: #444; - color: #fff; - padding: 5px 7px; -} - -#content { - top: 30px; - right: 0; - bottom: 0; - overflow: auto; - background: #fff; - color: #333; - padding: 0 18px; +section.container { + display: flex; + font-size: 100%; } -.sidebar { - position: fixed; - top: 30px; - bottom: 0; - overflow: auto; +h2 { + font-weight: normal; + font-size: 3em; + padding: 10px 0 2px 0; + margin: 0; } -#namespaces { - background: #e2e2e2; - border-right: solid 1px #cccccc; - left: 0; - width: 250px; +header { + color: #333; + padding: 10px; } -#vars { - background: #f2f2f2; - border-right: solid 1px #cccccc; - left: 251px; - width: 200px; +header small { + font-style: italic; } -.namespace-index { - left: 251px; +header h1 { + margin: 0; + padding: 0; + /* font-size: 12pt; */ + font-weight: lighter; + /* text-shadow: -1px -1px 0px #333; */ } -.namespace-docs { - left: 452px; +header h1 a { + color: #333; + /* font-size: 32px; */ + font-weight: 400; + text-decoration: none; } -#header { - background: -moz-linear-gradient(top, #555 0%, #222 100%); - background: -webkit-linear-gradient(top, #555 0%, #333 100%); - background: -o-linear-gradient(top, #555 0%, #222 100%); - background: -ms-linear-gradient(top, #555 0%, #222 100%); - background: linear-gradient(top, #555 0%, #222 100%); - box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); - z-index: 100; +#content { + overflow: auto; + background: #fff; + color: #333; + padding: 0 18px; + font-size: 1.3em; } -#header h1 { - margin: 0; - padding: 0; - font-size: 12pt; - font-weight: lighter; - text-shadow: -1px -1px 0px #333; +#namespaces { + border-right: solid 1px #cccccc; + min-width: 200px; + padding-right: 15px; } -#header a, .sidebar a { - display: block; - text-decoration: none; +#vars { + border-right: solid 1px #cccccc; + width: 200px; } -#header a { - color: #fff; +.sidebar { + overflow: auto; } .sidebar a { - color: #333; -} - -#header h2 { - float: right; - font-size: 9pt; - font-weight: normal; - margin: 3px 3px; - padding: 0; - color: #bbb; -} - -#header h2 a { - display: inline; + color: #333; + display: block; + text-decoration: none; } .sidebar h3 { - margin: 0; - padding: 10px 10px 0 10px; - font-size: 19px; - font-weight: normal; + margin: 0; + padding: 10px 10px 0 10px; + font-size: 19px; + font-weight: normal; } .sidebar ul { - padding: 0.5em 0em; - margin: 0; + padding: 0.5em 0em; + margin: 0; } .sidebar li { - display: block; - vertical-align: middle; + display: block; + vertical-align: middle; } .sidebar li a, .sidebar li .no-link { border-left: 3px solid transparent; - padding: 0 7px; + padding: 0 15px; white-space: nowrap; } @@ -150,6 +117,7 @@ h2 { .sidebar li a, .sidebar li .tree { height: 31px; + /* height: 25px; */ } .depth-1 .inner { padding-left: 2px; } @@ -194,38 +162,62 @@ h2 { } #namespaces li.current a { - border-left: 3px solid #a33; - color: #a33; + border-left: 3px solid #a33; + border-left: 3px solid #7a2518; + color: #a33; + color: #7a2518; + } #vars li.current a { - border-left: 3px solid #33a; - color: #33a; + border-left: 3px solid #33a; + color: #33a; } -#content h3 { - font-size: 13pt; - font-weight: bold; +.namespace-docs h2 { + color: #7a2518; } -.public h3 { - margin: 0; - float: left; +.namespace-docs h3 a { + color: #ba3925; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-weight: 400; + text-decoration: none; } -.usage { - clear: both; +.namespace-docs .usage code { + display: block; + color: #777; + margin: 2px 0; + font-size: 0.6em; +} + +/* .usage code:first-child { */ +/* padding-top: 10px; */ +/* } */ + + + +.namespace-index h3 a { + text-decoration: none; + color: #ba3925; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-weight: 300; +} + +.public h3 { + margin: 0; } .public { margin: 0; - border-top: 1px solid #e0e0e0; + border-top: 1px solid #efefef; padding-top: 14px; padding-bottom: 6px; } .public:last-child { - margin-bottom: 20%; + margin-bottom: 20%; } .members .public:last-child { @@ -252,7 +244,7 @@ h2 { } #content .members .inner h3 { - font-size: 12pt; + /* font-size: 12pt; */ } .members .public { @@ -270,9 +262,7 @@ h4.type, h4.dynamic, h4.added, h4.deprecated { - float: left; - margin: 3px 10px 15px 0; - font-size: 15px; + margin: 3px 10px 10spx 0; font-weight: bold; font-variant: small-caps; } @@ -281,9 +271,9 @@ h4.deprecated { .public h4.dynamic, .public h4.added, .public h4.deprecated { - font-size: 13px; font-weight: bold; - margin: 3px 0 0 10px; + /* margin: 3px 0 0 10px; */ + font-size: 0.7em; } .members h4.type, @@ -309,7 +299,7 @@ h4.deprecated { } .namespace { - margin-bottom: 30px; + margin-bottom: 40px; } .namespace:last-child { @@ -318,9 +308,7 @@ h4.deprecated { .index { padding: 0; - font-size: 80%; margin: 15px 0; - line-height: 16px; } .index * { @@ -335,18 +323,16 @@ h4.deprecated { padding-right: 5px; } -.index ul { - padding-left: 0; -} - -.usage code { - display: block; - color: #008; - margin: 2px 0; +.index li a { + color: #333; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-size: 0.8em; + text-decoration: none; + font-weight: 300; } -.usage code:first-child { - padding-top: 10px; +.index ul { + padding-left: 0; } p { @@ -375,27 +361,28 @@ p { } .markdown { - line-height: 18px; - font-size: 14px; + /* line-height: 18px; */ + /* font-size: 16px; */ } .doc, .public, .namespace .index { - max-width: 680px; + max-width: 780px; overflow-x: visible; } .markdown code, .src-link a { - background: #f6f6f6; - border: 1px solid #e4e4e4; border-radius: 2px; + font-size: 0.8em; + color: #444; } .markdown pre { background: #f4f4f4; border: 1px solid #e0e0e0; - border-radius: 2px; - padding: 5px 10px; - margin: 0 10px; + /* border-radius: 2px; */ + padding: 5px 5px; + border-top: 1px solid #e0e0e0; + border-bottom: 1px solid #e0e0e0; } .markdown pre code { @@ -440,7 +427,7 @@ p { .doc abbr { border-bottom: 1px dotted #333; font-variant: none - cursor: help; + cursor: help; } .src-link { @@ -448,7 +435,7 @@ p { } .src-link a { - font-size: 70%; + /* font-size: 70%; */ padding: 1px 4px; text-decoration: none; color: #5555bb; diff --git a/devel/codeina/index.html b/devel/codeina/index.html new file mode 100644 index 0000000..5b7fb80 --- /dev/null +++ b/devel/codeina/index.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.4.0-SNAPSHOT API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-get-value">get-value</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.channel.html">cats.monad.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.channel.html#var-channel-monad">channel-monad</a> </li><li> <a href="cats.monad.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either (Error) Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Try Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Cathegory theory types definition.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/codox/js/jquery.min.js b/devel/codeina/js/jquery.min.js similarity index 100% rename from devel/codox/js/jquery.min.js rename to devel/codeina/js/jquery.min.js diff --git a/devel/codox/js/page_effects.js b/devel/codeina/js/page_effects.js similarity index 100% rename from devel/codox/js/page_effects.js rename to devel/codeina/js/page_effects.js diff --git a/devel/codox/cats.builtin.html b/devel/codox/cats.builtin.html deleted file mode 100644 index 73e1832..0000000 --- a/devel/codox/cats.builtin.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. -</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.core.html b/devel/codox/cats.core.html deleted file mode 100644 index 001be61..0000000 --- a/devel/codox/cats.core.html +++ /dev/null @@ -1,142 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context"><div class="inner"><span>get-current-context</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. -</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. -</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. -Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the -arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, -ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. - -Example: - (>>= (just 1) (comp just inc) (comp just inc)) - ;=> #<Just [3]> -</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside -av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, -returning the identity element when the predicate yields false. - -Otherwise, returns the instance unchanged. - - (require '[cats.monad.moaybe :as maybe]) - (require '[cats.core :as m]) - - (m/filter (partial < 2) (maybe/just 3)) - ;=> <Just [3]> - - (m/filter (partial < 4) (maybe/just 3)) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. - -(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(m/forseq [2 3] maybe/just) -;=> <Just [[2 3]]> - -(m/forseq [1 2] - (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing)))) -;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-current-context"><h3>get-current-context</h3><div class="usage"><code>(get-current-context)</code><code>(get-current-context default)</code></div><div class="doc"><pre class="plaintext">Get current context or obtain it from -the provided instance.</pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value -of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a -monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (def monad+ (m/lift-m 2 +)) - - (monad+ (maybe/just 1) (maybe/just 2)) - ;=> <Just [3]> - - (monad+ (maybe/just 1) (maybe/nothing)) - ;=> <Nothing> - - (monad+ [0 2 4] [1 2]) - ;=> [1 2 3 4 5 6] -</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a -monadic context, map it into the given collection -calling sequence on the results. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/mapseq maybe/just [2 3]) - ;=> <Just [[2 3]]> - - (m/mapseq (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing))) - [1 2]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure -let. This allows much easy composition of monadic -computations. - -Let see one example for understand how it works, this is -a code using bind for compose few number of operations: - - - (bind (just 1) - (fn [a] - (bind (just (inc a)) - (fn [b] - (return (* b 2)))))) - ;=> #<Just [4]> - -Now see how this code can be more clear if you -are using mlet macro for do it: - - (mlet [a (just 1) - b (just (inc a))] - (return (* b 2))) - ;=> #<Just [4]> -</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the -same as mlet but specifying the monadic context. -So, instead of writing: - - (with-monad (maybe-transformer vector-monad) - (mlet [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2)))) - ;=> [#<Just [4]> #<Just [6]>] - -You can just write: - - (mlet-with (maybe-transformer vector-monad) - [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2))) - ;=> [#<Just [4]> #<Just [6]>] -</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in -default/effect free context. - -This is multiarity function that with arity pure/1 -it uses the dynamic scope to resolve the current -context. With pure/2, you can force a specific context -value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. -</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect -their values in a vector returned in the monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/sequence [(maybe/just 2) (maybe/just 3)]) - ;=> <Just [[2, 3]]> - - (m/sequence [(maybe/nothing) (maybe/just 3)]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext">Set current context to specific monad. -</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.channel.html b/devel/codox/cats.monad.channel.html deleted file mode 100644 index 435276f..0000000 --- a/devel/codox/cats.monad.channel.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.channel documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.channel.html#var-channel-monad"><div class="inner"><span>channel-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-promise"><div class="inner"><span>promise</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-promise-buffer"><div class="inner"><span>promise-buffer</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-then"><div class="inner"><span>then</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.monad.channel.html#var-with-value"><div class="inner"><span>with-value</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.channel</h2><div class="doc"><pre class="plaintext"></pre></div><div class="public anchor" id="var-channel-monad"><h3>channel-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-promise"><h3>promise</h3><div class="usage"><code>(promise)</code><code>(promise v)</code></div><div class="doc"><pre class="plaintext">Promise constructor. -</pre></div></div><div class="public anchor" id="var-promise-buffer"><h3>promise-buffer</h3><div class="usage"><code>(promise-buffer)</code><code>(promise-buffer v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-then"><h3>then</h3><div class="usage"><code>(then p handler)</code></div><div class="doc"><pre class="plaintext">Chain promise, mainly usefull if you do not want use -the go macro as sugar sintax.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><h4 class="type">macro</h4><div class="usage"><code>(when & promises)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-with-value"><h3>with-value</h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><pre class="plaintext">Simple helper that creates a channel and attach -an value to it.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.continuation.html b/devel/codox/cats.monad.continuation.html deleted file mode 100644 index 88a559f..0000000 --- a/devel/codox/cats.monad.continuation.html +++ /dev/null @@ -1,6 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. -</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. -</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.either.html b/devel/codox/cats.monad.either.html deleted file mode 100644 index 772d480..0000000 --- a/devel/codox/cats.monad.either.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. -</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. -</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. -</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.exception.html b/devel/codox/cats.monad.exception.html deleted file mode 100644 index a44472f..0000000 --- a/devel/codox/cats.monad.exception.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. - -The Try type represents a computation that may either result in an exception, -or return a successfully computed value. It's similar to, but semantically -different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. -</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. -</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. -</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. - -Is a high order function that accept a function -as parameter and returns an other that returns -success or failure depending of result of the -first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.html b/devel/codox/cats.monad.html deleted file mode 100644 index 53b2fe9..0000000 --- a/devel/codox/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.identity.html b/devel/codox/cats.monad.identity.html deleted file mode 100644 index 4fdcea4..0000000 --- a/devel/codox/cats.monad.identity.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. -</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. -</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. -</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.maybe.html b/devel/codox/cats.monad.maybe.html deleted file mode 100644 index 7d17c48..0000000 --- a/devel/codox/cats.monad.maybe.html +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. -</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. -</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. - -Examples: - (from-maybe (just 1)) - ;=> 1 - (from-maybe (just 1) 42) - ;=> 1 - (from-maybe (nothing)) - ;=> nil - (from-maybe (nothing) 42) - ;=> 42 -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.reader.html b/devel/codox/cats.monad.reader.html deleted file mode 100644 index 6a14ee2..0000000 --- a/devel/codox/cats.monad.reader.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. -</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. -</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function -to Reader class instance. -Reader class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the -wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.state.html b/devel/codox/cats.monad.state.html deleted file mode 100644 index a3e318d..0000000 --- a/devel/codox/cats.monad.state.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. -</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. -</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -value, ignoring the state. -Equivalent to taking the first value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -state. -Equivalent to taking the second value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces -the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and returns a cats.data.Pair -instance with result and new state. - - (def computation (mlet [x (get-state) - y (put-state (inc x))] - (return y))) - - (def initial-state 1) - (run-state computation initial-state) - -This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function -to State class instance. -State class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the -specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.monad.writer.html b/devel/codox/cats.monad.writer.html deleted file mode 100644 index 83b2f70..0000000 --- a/devel/codox/cats.monad.writer.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. -</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/cats.protocols.html b/devel/codox/cats.protocols.html deleted file mode 100644 index 31b9a62..0000000 --- a/devel/codox/cats.protocols.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. -</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) -inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. -</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. -</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. -</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state -and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. -</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. -</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. -</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. -</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, -yield a writer which has the first element of the pair as the value and -the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. -</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/devel/codox/index.html b/devel/codox/index.html deleted file mode 100644 index 17b6d16..0000000 --- a/devel/codox/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.4.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.4.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.4.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.channel.html">cats.monad.channel</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.channel.html#var-channel-monad">channel-monad</a> </li><li> <a href="cats.monad.channel.html#var-promise">promise</a> </li><li> <a href="cats.monad.channel.html#var-promise-buffer">promise-buffer</a> </li><li> <a href="cats.monad.channel.html#var-then">then</a> </li><li> <a href="cats.monad.channel.html#var-when">when</a> </li><li> <a href="cats.monad.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/devel/index.html b/devel/index.html index dbb3663..802f5cb 100644 --- a/devel/index.html +++ b/devel/index.html @@ -580,7 +580,7 @@ <h3 id="_why_another_library">1.1. Why another library?</h3> <h2 id="_project_maturity">2. Project Maturity</h2> <div class="sectionbody"> <div class="paragraph"> -<p>Since <em>cats</em> is a young project, there can be some <a href="codox/index.html#id">API</a> breakage.</p> +<p>Since <em>cats</em> is a young project, there can be some <a href="codeina/index.html#id">API</a> breakage.</p> </div> </div> </div> @@ -1624,7 +1624,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-02-26 22:58:47 CET +Last updated 2015-03-22 00:35:13 CET </div> </div> </body> From 0710d2ef93e354dd5a99e6381d40329c5fb29e17 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Sun, 22 Mar 2015 10:07:29 +0100 Subject: [PATCH 37/52] Update devel doc --- devel/{codeina => api}/cats.builtin.html | 0 devel/{codeina => api}/cats.core.html | 0 devel/{codeina => api}/cats.data.html | 0 devel/{codeina => api}/cats.monad.channel.html | 0 devel/{codeina => api}/cats.monad.continuation.html | 0 devel/{codeina => api}/cats.monad.either.html | 0 devel/{codeina => api}/cats.monad.exception.html | 0 devel/{codeina => api}/cats.monad.html | 0 devel/{codeina => api}/cats.monad.identity.html | 0 devel/{codeina => api}/cats.monad.maybe.html | 0 devel/{codeina => api}/cats.monad.reader.html | 0 devel/{codeina => api}/cats.monad.state.html | 0 devel/{codeina => api}/cats.monad.writer.html | 0 devel/{codeina => api}/cats.protocols.html | 0 devel/{codeina => api}/css/default.css | 0 devel/{codeina => api}/index.html | 0 devel/{codeina => api}/js/jquery.min.js | 0 devel/{codeina => api}/js/page_effects.js | 0 devel/index.html | 4 ++-- 19 files changed, 2 insertions(+), 2 deletions(-) rename devel/{codeina => api}/cats.builtin.html (100%) rename devel/{codeina => api}/cats.core.html (100%) rename devel/{codeina => api}/cats.data.html (100%) rename devel/{codeina => api}/cats.monad.channel.html (100%) rename devel/{codeina => api}/cats.monad.continuation.html (100%) rename devel/{codeina => api}/cats.monad.either.html (100%) rename devel/{codeina => api}/cats.monad.exception.html (100%) rename devel/{codeina => api}/cats.monad.html (100%) rename devel/{codeina => api}/cats.monad.identity.html (100%) rename devel/{codeina => api}/cats.monad.maybe.html (100%) rename devel/{codeina => api}/cats.monad.reader.html (100%) rename devel/{codeina => api}/cats.monad.state.html (100%) rename devel/{codeina => api}/cats.monad.writer.html (100%) rename devel/{codeina => api}/cats.protocols.html (100%) rename devel/{codeina => api}/css/default.css (100%) rename devel/{codeina => api}/index.html (100%) rename devel/{codeina => api}/js/jquery.min.js (100%) rename devel/{codeina => api}/js/page_effects.js (100%) diff --git a/devel/codeina/cats.builtin.html b/devel/api/cats.builtin.html similarity index 100% rename from devel/codeina/cats.builtin.html rename to devel/api/cats.builtin.html diff --git a/devel/codeina/cats.core.html b/devel/api/cats.core.html similarity index 100% rename from devel/codeina/cats.core.html rename to devel/api/cats.core.html diff --git a/devel/codeina/cats.data.html b/devel/api/cats.data.html similarity index 100% rename from devel/codeina/cats.data.html rename to devel/api/cats.data.html diff --git a/devel/codeina/cats.monad.channel.html b/devel/api/cats.monad.channel.html similarity index 100% rename from devel/codeina/cats.monad.channel.html rename to devel/api/cats.monad.channel.html diff --git a/devel/codeina/cats.monad.continuation.html b/devel/api/cats.monad.continuation.html similarity index 100% rename from devel/codeina/cats.monad.continuation.html rename to devel/api/cats.monad.continuation.html diff --git a/devel/codeina/cats.monad.either.html b/devel/api/cats.monad.either.html similarity index 100% rename from devel/codeina/cats.monad.either.html rename to devel/api/cats.monad.either.html diff --git a/devel/codeina/cats.monad.exception.html b/devel/api/cats.monad.exception.html similarity index 100% rename from devel/codeina/cats.monad.exception.html rename to devel/api/cats.monad.exception.html diff --git a/devel/codeina/cats.monad.html b/devel/api/cats.monad.html similarity index 100% rename from devel/codeina/cats.monad.html rename to devel/api/cats.monad.html diff --git a/devel/codeina/cats.monad.identity.html b/devel/api/cats.monad.identity.html similarity index 100% rename from devel/codeina/cats.monad.identity.html rename to devel/api/cats.monad.identity.html diff --git a/devel/codeina/cats.monad.maybe.html b/devel/api/cats.monad.maybe.html similarity index 100% rename from devel/codeina/cats.monad.maybe.html rename to devel/api/cats.monad.maybe.html diff --git a/devel/codeina/cats.monad.reader.html b/devel/api/cats.monad.reader.html similarity index 100% rename from devel/codeina/cats.monad.reader.html rename to devel/api/cats.monad.reader.html diff --git a/devel/codeina/cats.monad.state.html b/devel/api/cats.monad.state.html similarity index 100% rename from devel/codeina/cats.monad.state.html rename to devel/api/cats.monad.state.html diff --git a/devel/codeina/cats.monad.writer.html b/devel/api/cats.monad.writer.html similarity index 100% rename from devel/codeina/cats.monad.writer.html rename to devel/api/cats.monad.writer.html diff --git a/devel/codeina/cats.protocols.html b/devel/api/cats.protocols.html similarity index 100% rename from devel/codeina/cats.protocols.html rename to devel/api/cats.protocols.html diff --git a/devel/codeina/css/default.css b/devel/api/css/default.css similarity index 100% rename from devel/codeina/css/default.css rename to devel/api/css/default.css diff --git a/devel/codeina/index.html b/devel/api/index.html similarity index 100% rename from devel/codeina/index.html rename to devel/api/index.html diff --git a/devel/codeina/js/jquery.min.js b/devel/api/js/jquery.min.js similarity index 100% rename from devel/codeina/js/jquery.min.js rename to devel/api/js/jquery.min.js diff --git a/devel/codeina/js/page_effects.js b/devel/api/js/page_effects.js similarity index 100% rename from devel/codeina/js/page_effects.js rename to devel/api/js/page_effects.js diff --git a/devel/index.html b/devel/index.html index 802f5cb..5e6e92f 100644 --- a/devel/index.html +++ b/devel/index.html @@ -580,7 +580,7 @@ <h3 id="_why_another_library">1.1. Why another library?</h3> <h2 id="_project_maturity">2. Project Maturity</h2> <div class="sectionbody"> <div class="paragraph"> -<p>Since <em>cats</em> is a young project, there can be some <a href="codeina/index.html#id">API</a> breakage.</p> +<p>Since <em>cats</em> is a young project, there can be some <a href="api/index.html#id">API</a> breakage.</p> </div> </div> </div> @@ -1624,7 +1624,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-03-22 00:35:13 CET +Last updated 2015-03-22 10:06:52 CET </div> </div> </body> From 9e0b0ab698b24f99980187f7a2562af01c9d8441 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.be> Date: Wed, 25 Mar 2015 21:15:41 +0100 Subject: [PATCH 38/52] Update latest doc --- latest/api/cats.builtin.html | 2 + latest/api/cats.core.html | 74 +++ latest/api/cats.data.html | 2 + latest/api/cats.monad.channel.html | 2 + latest/api/cats.monad.continuation.html | 2 + latest/api/cats.monad.either.html | 10 + latest/api/cats.monad.exception.html | 2 + .../cats.data.html => api/cats.monad.html} | 4 +- latest/api/cats.monad.identity.html | 2 + latest/api/cats.monad.maybe.html | 16 + latest/api/cats.monad.reader.html | 2 + latest/api/cats.monad.state.html | 2 + latest/api/cats.monad.writer.html | 2 + latest/api/cats.protocols.html | 2 + latest/{codox => api}/css/default.css | 263 ++++----- latest/api/index.html | 2 + latest/{codox => api}/js/jquery.min.js | 0 latest/{codox => api}/js/page_effects.js | 0 latest/codox/cats.builtin.html | 3 - latest/codox/cats.core.html | 140 ----- latest/codox/cats.monad.continuation.html | 6 - latest/codox/cats.monad.either.html | 8 - latest/codox/cats.monad.exception.html | 14 - latest/codox/cats.monad.html | 2 - latest/codox/cats.monad.identity.html | 5 - latest/codox/cats.monad.maybe.html | 16 - latest/codox/cats.monad.reader.html | 10 - latest/codox/cats.monad.state.html | 31 - latest/codox/cats.monad.writer.html | 3 - latest/codox/cats.protocols.html | 28 - latest/codox/index.html | 2 - latest/index.html | 557 ++++++++---------- 32 files changed, 490 insertions(+), 724 deletions(-) create mode 100644 latest/api/cats.builtin.html create mode 100644 latest/api/cats.core.html create mode 100644 latest/api/cats.data.html create mode 100644 latest/api/cats.monad.channel.html create mode 100644 latest/api/cats.monad.continuation.html create mode 100644 latest/api/cats.monad.either.html create mode 100644 latest/api/cats.monad.exception.html rename latest/{codox/cats.data.html => api/cats.monad.html} (57%) create mode 100644 latest/api/cats.monad.identity.html create mode 100644 latest/api/cats.monad.maybe.html create mode 100644 latest/api/cats.monad.reader.html create mode 100644 latest/api/cats.monad.state.html create mode 100644 latest/api/cats.monad.writer.html create mode 100644 latest/api/cats.protocols.html rename latest/{codox => api}/css/default.css (59%) create mode 100644 latest/api/index.html rename latest/{codox => api}/js/jquery.min.js (100%) rename latest/{codox => api}/js/page_effects.js (100%) delete mode 100644 latest/codox/cats.builtin.html delete mode 100644 latest/codox/cats.core.html delete mode 100644 latest/codox/cats.monad.continuation.html delete mode 100644 latest/codox/cats.monad.either.html delete mode 100644 latest/codox/cats.monad.exception.html delete mode 100644 latest/codox/cats.monad.html delete mode 100644 latest/codox/cats.monad.identity.html delete mode 100644 latest/codox/cats.monad.maybe.html delete mode 100644 latest/codox/cats.monad.reader.html delete mode 100644 latest/codox/cats.monad.state.html delete mode 100644 latest/codox/cats.monad.writer.html delete mode 100644 latest/codox/cats.protocols.html delete mode 100644 latest/codox/index.html diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html new file mode 100644 index 0000000..fd80930 --- /dev/null +++ b/latest/api/cats.builtin.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html new file mode 100644 index 0000000..6153efe --- /dev/null +++ b/latest/api/cats.core.html @@ -0,0 +1,74 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><div class="markdown"><p>Alias of fmap.</p></div></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative fapply.</p></div></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> +<pre><code>(>>= (just 1) (comp just inc) (comp just inc)) +;; => #<Just [3]> +</code></pre></div></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context <code>mv</code> and any function, applies a function to value of mv.</p> +<pre><code>(bind (either/right 1) (fn [v] + (return (inc v)))) +;; => #<Right [2]> +</code></pre><p>For convenience, you may prefer use a <code>mlet</code> macro that add a beautiful, let like syntax for compose operations with <code>bind</code> function.</p></div></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s conext and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p></div></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> +<pre><code>(require '[cats.monad.moaybe :as maybe]) +(require '[cats.core :as m]) + +(m/filter (partial < 2) (maybe/just 3)) +;=> <Just [3]> + +(m/filter (partial < 4) (maybe/just 3)) +;=> <Nothing> +</code></pre></div></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>Let se a little example:</p> +<pre><code>(m/forseq [2 3] maybe/just) +;; => <Just [[2 3]]> +</code></pre><p>Yet an other example that fails:</p> +<pre><code>(m/forseq [1 2] + (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing)))) +;; => <Nothing> +</code></pre></div></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is same as that <code>(bind mv identity)</code></p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> +<pre><code>(def monad+ (lift-m 2 +)) + +(monad+ (maybe/just 1) (maybe/just 2)) +;; => <Just [3]> + +(monad+ (maybe/just 1) (maybe/nothing)) +;; => <Nothing> + +(monad+ [0 2 4] [1 2]) +;; => [1 2 3 4 5 6] +</code></pre></div></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> +<pre><code>(require '[cats.monad.maybe :as maybe]) +(require '[cats.core :as m]) + +(m/mapseq maybe/just [2 3]) +;=> <Just [[2 3]]> + +(m/mapseq (fn [v] + (if (odd? v) + (maybe/just v) + (maybe/nothing))) + [1 2]) +;=> <Nothing> +</code></pre></div></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> +<pre><code>(bind (just 1) + (fn [a] + (bind (just (inc a)) + (fn [b] + (return (* b 2)))))) +;=> #<Just [4]> +</code></pre><p>Now see how this code can be more clear if you are using mlet macro for do it:</p> +<pre><code>(mlet [a (just 1) + b (just (inc a))] + (return (* b 2))) +;=> #<Just [4]> +</code></pre></div></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +<pre><code>(with-monad either/either-monad + (pure 1) +;; => #<Right [1]> +</code></pre></div></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure and it works identically to it.</p></div></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> +<pre><code>(sequence [(maybe/just 2) (maybe/just 3)]) +;; => <Just [[2, 3]]> + +(sequence [(maybe/nothing) (maybe/just 3)]) +;; => <Nothing> +</code></pre></div></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html new file mode 100644 index 0000000..cdcee63 --- /dev/null +++ b/latest/api/cats.data.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.channel.html b/latest/api/cats.monad.channel.html new file mode 100644 index 0000000..b42017b --- /dev/null +++ b/latest/api/cats.monad.channel.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.continuation.html b/latest/api/cats.monad.continuation.html new file mode 100644 index 0000000..0ad670e --- /dev/null +++ b/latest/api/cats.monad.continuation.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html new file mode 100644 index 0000000..360812a --- /dev/null +++ b/latest/api/cats.monad.either.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<pre><code>(require '[cats.monad.either :as either]) + +(either/right 1) +;; => #<Right [1]> + +(either/left 1) +;; => #<Left [1]> +</code></pre></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div></div><div class="public anchor" id="var-from-either"><h3><a href="#var-from-either">from-either</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(from-either mv)</code></div><div class="doc"><div class="markdown"><p>Return inner value of either monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Either monad.</p><p>The use of this function is DEPRECATED and <code>cats.core/extract</code> should be used.</p></div></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html new file mode 100644 index 0000000..31f3044 --- /dev/null +++ b/latest/api/cats.monad.exception.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/codox/cats.data.html b/latest/api/cats.monad.html similarity index 57% rename from latest/codox/cats.data.html rename to latest/api/cats.monad.html index 3e8e4d6..473264f 100644 --- a/latest/codox/cats.data.html +++ b/latest/api/cats.monad.html @@ -1,4 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. -</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. -</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html new file mode 100644 index 0000000..dc4d240 --- /dev/null +++ b/latest/api/cats.monad.identity.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html new file mode 100644 index 0000000..064c33c --- /dev/null +++ b/latest/api/cats.monad.maybe.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<pre><code>(require '[cats.monad.maybe :as maybe]) + +(maybe/just 1) +;; => #<Just [1]> +</code></pre></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> +<pre><code>(from-maybe (just 1)) +;=> 1 + +(from-maybe (nothing)) +;=> nil + +(from-maybe (nothing) 42) +;=> 42 +</code></pre></div></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.reader.html b/latest/api/cats.monad.reader.html new file mode 100644 index 0000000..68eee5f --- /dev/null +++ b/latest/api/cats.monad.reader.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.state.html b/latest/api/cats.monad.state.html new file mode 100644 index 0000000..4cacb70 --- /dev/null +++ b/latest/api/cats.monad.state.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.writer.html b/latest/api/cats.monad.writer.html new file mode 100644 index 0000000..6a0a646 --- /dev/null +++ b/latest/api/cats.monad.writer.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html new file mode 100644 index 0000000..a2e49cb --- /dev/null +++ b/latest/api/cats.protocols.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Functor abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"><code>(ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for <code>ctx</code>.</p></div></div></div></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/codox/css/default.css b/latest/api/css/default.css similarity index 59% rename from latest/codox/css/default.css rename to latest/api/css/default.css index fcabf4e..257ab2c 100644 --- a/latest/codox/css/default.css +++ b/latest/api/css/default.css @@ -1,138 +1,105 @@ +@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono:200,300,400); +@import url(http://fonts.googleapis.com/css?family=Lato:light,regular); +@import url(http://fonts.googleapis.com/css?family=Ubuntu:300,400,500); + body { - font-family: Helvetica, Arial, sans-serif; - font-size: 15px; + font-family: "Lato", Helvetica, Arial, sans-serif; + font-weight: 300; + color:#585858; + font-size: 100%; + margin: 0px; } pre, code { - font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; - font-size: 9pt; - margin: 15px 0; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-weight: 300; } -h2 { - font-weight: normal; - font-size: 28px; - padding: 10px 0 2px 0; - margin: 0; -} - -#header, #content, .sidebar { - position: fixed; -} - -#header { - top: 0; - left: 0; - right: 0; - height: 20px; - background: #444; - color: #fff; - padding: 5px 7px; -} - -#content { - top: 30px; - right: 0; - bottom: 0; - overflow: auto; - background: #fff; - color: #333; - padding: 0 18px; +section.container { + display: flex; + font-size: 100%; } -.sidebar { - position: fixed; - top: 30px; - bottom: 0; - overflow: auto; +h2 { + font-weight: normal; + font-size: 3em; + padding: 10px 0 2px 0; + margin: 0; } -#namespaces { - background: #e2e2e2; - border-right: solid 1px #cccccc; - left: 0; - width: 250px; +header { + color: #333; + padding: 10px; } -#vars { - background: #f2f2f2; - border-right: solid 1px #cccccc; - left: 251px; - width: 200px; +header small { + font-style: italic; } -.namespace-index { - left: 251px; +header h1 { + margin: 0; + padding: 0; + /* font-size: 12pt; */ + font-weight: lighter; + /* text-shadow: -1px -1px 0px #333; */ } -.namespace-docs { - left: 452px; +header h1 a { + color: #333; + /* font-size: 32px; */ + font-weight: 400; + text-decoration: none; } -#header { - background: -moz-linear-gradient(top, #555 0%, #222 100%); - background: -webkit-linear-gradient(top, #555 0%, #333 100%); - background: -o-linear-gradient(top, #555 0%, #222 100%); - background: -ms-linear-gradient(top, #555 0%, #222 100%); - background: linear-gradient(top, #555 0%, #222 100%); - box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); - z-index: 100; +#content { + overflow: auto; + background: #fff; + color: #333; + padding: 0 18px; + font-size: 1.3em; } -#header h1 { - margin: 0; - padding: 0; - font-size: 12pt; - font-weight: lighter; - text-shadow: -1px -1px 0px #333; +#namespaces { + border-right: solid 1px #cccccc; + min-width: 200px; + padding-right: 15px; } -#header a, .sidebar a { - display: block; - text-decoration: none; +#vars { + border-right: solid 1px #cccccc; + width: 200px; } -#header a { - color: #fff; +.sidebar { + overflow: auto; } .sidebar a { - color: #333; -} - -#header h2 { - float: right; - font-size: 9pt; - font-weight: normal; - margin: 3px 3px; - padding: 0; - color: #bbb; -} - -#header h2 a { - display: inline; + color: #333; + display: block; + text-decoration: none; } .sidebar h3 { - margin: 0; - padding: 10px 10px 0 10px; - font-size: 19px; - font-weight: normal; + margin: 0; + padding: 10px 10px 0 10px; + font-size: 19px; + font-weight: normal; } .sidebar ul { - padding: 0.5em 0em; - margin: 0; + padding: 0.5em 0em; + margin: 0; } .sidebar li { - display: block; - vertical-align: middle; + display: block; + vertical-align: middle; } .sidebar li a, .sidebar li .no-link { border-left: 3px solid transparent; - padding: 0 7px; + padding: 0 15px; white-space: nowrap; } @@ -150,6 +117,7 @@ h2 { .sidebar li a, .sidebar li .tree { height: 31px; + /* height: 25px; */ } .depth-1 .inner { padding-left: 2px; } @@ -194,38 +162,62 @@ h2 { } #namespaces li.current a { - border-left: 3px solid #a33; - color: #a33; + border-left: 3px solid #a33; + border-left: 3px solid #7a2518; + color: #a33; + color: #7a2518; + } #vars li.current a { - border-left: 3px solid #33a; - color: #33a; + border-left: 3px solid #33a; + color: #33a; } -#content h3 { - font-size: 13pt; - font-weight: bold; +.namespace-docs h2 { + color: #7a2518; } -.public h3 { - margin: 0; - float: left; +.namespace-docs h3 a { + color: #ba3925; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-weight: 400; + text-decoration: none; } -.usage { - clear: both; +.namespace-docs .usage code { + display: block; + color: #777; + margin: 2px 0; + font-size: 0.6em; +} + +/* .usage code:first-child { */ +/* padding-top: 10px; */ +/* } */ + + + +.namespace-index h3 a { + text-decoration: none; + color: #ba3925; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-weight: 300; +} + +.public h3 { + margin: 0; } .public { margin: 0; - border-top: 1px solid #e0e0e0; + border-top: 1px solid #efefef; padding-top: 14px; padding-bottom: 6px; } .public:last-child { - margin-bottom: 20%; + margin-bottom: 20%; } .members .public:last-child { @@ -252,7 +244,7 @@ h2 { } #content .members .inner h3 { - font-size: 12pt; + /* font-size: 12pt; */ } .members .public { @@ -270,9 +262,7 @@ h4.type, h4.dynamic, h4.added, h4.deprecated { - float: left; - margin: 3px 10px 15px 0; - font-size: 15px; + margin: 3px 10px 10spx 0; font-weight: bold; font-variant: small-caps; } @@ -281,9 +271,9 @@ h4.deprecated { .public h4.dynamic, .public h4.added, .public h4.deprecated { - font-size: 13px; font-weight: bold; - margin: 3px 0 0 10px; + /* margin: 3px 0 0 10px; */ + font-size: 0.7em; } .members h4.type, @@ -309,7 +299,7 @@ h4.deprecated { } .namespace { - margin-bottom: 30px; + margin-bottom: 40px; } .namespace:last-child { @@ -318,9 +308,7 @@ h4.deprecated { .index { padding: 0; - font-size: 80%; margin: 15px 0; - line-height: 16px; } .index * { @@ -335,18 +323,16 @@ h4.deprecated { padding-right: 5px; } -.index ul { - padding-left: 0; -} - -.usage code { - display: block; - color: #008; - margin: 2px 0; +.index li a { + color: #333; + font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; + font-size: 0.8em; + text-decoration: none; + font-weight: 300; } -.usage code:first-child { - padding-top: 10px; +.index ul { + padding-left: 0; } p { @@ -375,27 +361,28 @@ p { } .markdown { - line-height: 18px; - font-size: 14px; + /* line-height: 18px; */ + /* font-size: 16px; */ } .doc, .public, .namespace .index { - max-width: 680px; + max-width: 780px; overflow-x: visible; } .markdown code, .src-link a { - background: #f6f6f6; - border: 1px solid #e4e4e4; border-radius: 2px; + font-size: 0.8em; + color: #444; } .markdown pre { background: #f4f4f4; border: 1px solid #e0e0e0; - border-radius: 2px; - padding: 5px 10px; - margin: 0 10px; + /* border-radius: 2px; */ + padding: 5px 5px; + border-top: 1px solid #e0e0e0; + border-bottom: 1px solid #e0e0e0; } .markdown pre code { @@ -440,7 +427,7 @@ p { .doc abbr { border-bottom: 1px dotted #333; font-variant: none - cursor: help; + cursor: help; } .src-link { @@ -448,7 +435,7 @@ p { } .src-link a { - font-size: 70%; + /* font-size: 70%; */ padding: 1px 4px; text-decoration: none; color: #5555bb; diff --git a/latest/api/index.html b/latest/api/index.html new file mode 100644 index 0000000..0611e97 --- /dev/null +++ b/latest/api/index.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.4.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/codox/js/jquery.min.js b/latest/api/js/jquery.min.js similarity index 100% rename from latest/codox/js/jquery.min.js rename to latest/api/js/jquery.min.js diff --git a/latest/codox/js/page_effects.js b/latest/api/js/page_effects.js similarity index 100% rename from latest/codox/js/page_effects.js rename to latest/api/js/page_effects.js diff --git a/latest/codox/cats.builtin.html b/latest/codox/cats.builtin.html deleted file mode 100644 index c8d00df..0000000 --- a/latest/codox/cats.builtin.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. -</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.core.html b/latest/codox/cats.core.html deleted file mode 100644 index 563c3b1..0000000 --- a/latest/codox/cats.core.html +++ /dev/null @@ -1,140 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. -</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. -</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. -Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the -arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, -ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. - -Example: - (>>= (just 1) (comp just inc) (comp just inc)) - ;=> #<Just [3]> -</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside -av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, -returning the identity element when the predicate yields false. - -Otherwise, returns the instance unchanged. - - (require '[cats.monad.moaybe :as maybe]) - (require '[cats.core :as m]) - - (m/filter (partial < 2) (maybe/just 3)) - ;=> <Just [3]> - - (m/filter (partial < 4) (maybe/just 3)) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. - -(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(m/forseq [2 3] maybe/just) -;=> <Just [[2 3]]> - -(m/forseq [1 2] - (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing)))) -;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value -of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a -monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (def monad+ (m/lift-m 2 +)) - - (monad+ (maybe/just 1) (maybe/just 2)) - ;=> <Just [3]> - - (monad+ (maybe/just 1) (maybe/nothing)) - ;=> <Nothing> - - (monad+ [0 2 4] [1 2]) - ;=> [1 2 3 4 5 6] -</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a -monadic context, map it into the given collection -calling sequence on the results. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/mapseq maybe/just [2 3]) - ;=> <Just [[2 3]]> - - (m/mapseq (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing))) - [1 2]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure -let. This allows much easy composition of monadic -computations. - -Let see one example for understand how it works, this is -a code using bind for compose few number of operations: - - - (bind (just 1) - (fn [a] - (bind (just (inc a)) - (fn [b] - (return (* b 2)))))) - ;=> #<Just [4]> - -Now see how this code can be more clear if you -are using mlet macro for do it: - - (mlet [a (just 1) - b (just (inc a))] - (return (* b 2))) - ;=> #<Just [4]> -</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the -same as mlet but specifying the monadic context. -So, instead of writing: - - (with-monad (maybe-transformer vector-monad) - (mlet [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2)))) - ;=> [#<Just [4]> #<Just [6]>] - -You can just write: - - (mlet-with (maybe-transformer vector-monad) - [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2))) - ;=> [#<Just [4]> #<Just [6]>] -</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in -default/effect free context. - -This is multiarity function that with arity pure/1 -it uses the dynamic scope to resolve the current -context. With pure/2, you can force a specific context -value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. -</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect -their values in a vector returned in the monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/sequence [(maybe/just 2) (maybe/just 3)]) - ;=> <Just [[2, 3]]> - - (m/sequence [(maybe/nothing) (maybe/just 3)]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.continuation.html b/latest/codox/cats.monad.continuation.html deleted file mode 100644 index 4a55a28..0000000 --- a/latest/codox/cats.monad.continuation.html +++ /dev/null @@ -1,6 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. -</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. -</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.either.html b/latest/codox/cats.monad.either.html deleted file mode 100644 index a1d9159..0000000 --- a/latest/codox/cats.monad.either.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. -</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. -</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. -</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.exception.html b/latest/codox/cats.monad.exception.html deleted file mode 100644 index 07ad0aa..0000000 --- a/latest/codox/cats.monad.exception.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. - -The Try type represents a computation that may either result in an exception, -or return a successfully computed value. It's similar to, but semantically -different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. -</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. -</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. -</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. - -Is a high order function that accept a function -as parameter and returns an other that returns -success or failure depending of result of the -first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.html b/latest/codox/cats.monad.html deleted file mode 100644 index 9d4a6ae..0000000 --- a/latest/codox/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.identity.html b/latest/codox/cats.monad.identity.html deleted file mode 100644 index be4ea53..0000000 --- a/latest/codox/cats.monad.identity.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. -</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. -</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. -</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.maybe.html b/latest/codox/cats.monad.maybe.html deleted file mode 100644 index 2326659..0000000 --- a/latest/codox/cats.monad.maybe.html +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. -</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. -</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. - -Examples: - (from-maybe (just 1)) - ;=> 1 - (from-maybe (just 1) 42) - ;=> 1 - (from-maybe (nothing)) - ;=> nil - (from-maybe (nothing) 42) - ;=> 42 -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.reader.html b/latest/codox/cats.monad.reader.html deleted file mode 100644 index 0b2941c..0000000 --- a/latest/codox/cats.monad.reader.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. -</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. -</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function -to Reader class instance. -Reader class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the -wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.state.html b/latest/codox/cats.monad.state.html deleted file mode 100644 index 1e80032..0000000 --- a/latest/codox/cats.monad.state.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. -</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. -</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -value, ignoring the state. -Equivalent to taking the first value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -state. -Equivalent to taking the second value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces -the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and returns a cats.data.Pair -instance with result and new state. - - (def computation (mlet [x (get-state) - y (put-state (inc x))] - (return y))) - - (def initial-state 1) - (run-state computation initial-state) - -This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function -to State class instance. -State class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the -specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.monad.writer.html b/latest/codox/cats.monad.writer.html deleted file mode 100644 index f55597f..0000000 --- a/latest/codox/cats.monad.writer.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. -</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/cats.protocols.html b/latest/codox/cats.protocols.html deleted file mode 100644 index ffc90cc..0000000 --- a/latest/codox/cats.protocols.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. -</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) -inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. -</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. -</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. -</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state -and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. -</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. -</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. -</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. -</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, -yield a writer which has the first element of the pair as the value and -the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. -</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/latest/codox/index.html b/latest/codox/index.html deleted file mode 100644 index ecbfa8d..0000000 --- a/latest/codox/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.4 API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.4 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.4</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 4faf2c7..4f09e0e 100644 --- a/latest/index.html +++ b/latest/index.html @@ -480,55 +480,51 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.3.4</span> +<span id="revdate">0.4.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> <ul class="sectlevel1"> -<li><a href="#_introduction">1. Introduction</a> +<li><a href="#_introduction">1. Introduction</a></li> +<li><a href="#_rationale">2. Rationale</a></li> +<li><a href="#_project_maturity">3. Project Maturity</a></li> +<li><a href="#_install">4. Install</a> <ul class="sectlevel2"> -<li><a href="#_why_another_library">1.1. Why another library?</a></li> +<li><a href="#_leiningen">4.1. Leiningen</a></li> +<li><a href="#_get_the_code">4.2. Get the Code</a></li> </ul> </li> -<li><a href="#_project_maturity">2. Project Maturity</a></li> -<li><a href="#_install">3. Install</a> +<li><a href="#_user_guide">5. User Guide</a> <ul class="sectlevel2"> -<li><a href="#_leiningen">3.1. Leiningen</a></li> -<li><a href="#_maven">3.2. Maven</a></li> -<li><a href="#_get_the_code">3.3. Get the Code</a></li> +<li><a href="#_functor">5.1. Functor</a></li> +<li><a href="#_applicative">5.2. Applicative</a></li> +<li><a href="#_monad">5.3. Monad</a></li> +<li><a href="#_monad_transformers">5.4. Monad Transformers</a></li> </ul> </li> -<li><a href="#_user_guide">4. User Guide</a> +<li><a href="#_monad_types">6. Monad types</a> <ul class="sectlevel2"> -<li><a href="#_functor">4.1. Functor</a></li> -<li><a href="#_applicative">4.2. Applicative</a></li> -<li><a href="#_monad">4.3. Monad</a></li> -<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> +<li><a href="#_maybe">6.1. Maybe</a></li> +<li><a href="#_either">6.2. Either</a></li> +<li><a href="#_exception">6.3. Exception</a></li> +<li><a href="#_state">6.4. State</a></li> +<li><a href="#_reader">6.5. Reader</a></li> +<li><a href="#_writer">6.6. Writer</a></li> +<li><a href="#_continuation">6.7. Continuation</a></li> +<li><a href="#_vector">6.8. Vector</a></li> +<li><a href="#_other_monads">6.9. Other monads</a></li> </ul> </li> -<li><a href="#_monad_types">5. Monad types</a> +<li><a href="#_faq">7. FAQ</a> <ul class="sectlevel2"> -<li><a href="#_maybe">5.1. Maybe</a></li> -<li><a href="#_either">5.2. Either</a></li> -<li><a href="#_try">5.3. Try</a></li> -<li><a href="#_state">5.4. State</a></li> -<li><a href="#_reader">5.5. Reader</a></li> -<li><a href="#_writer">5.6. Writer</a></li> -<li><a href="#_continuation">5.7. Continuation</a></li> -<li><a href="#_vector">5.8. Vector</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</a></li> </ul> </li> -<li><a href="#_faq">6. FAQ</a> +<li><a href="#_how_to_contribute">8. How to Contribute?</a> <ul class="sectlevel2"> -<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</a></li> -</ul> -</li> -<li><a href="#_how_to_contribute">7. How to Contribute?</a> -<ul class="sectlevel2"> -<li><a href="#_philosophy">7.1. Philosophy</a></li> -<li><a href="#_procedure">7.2. Procedure</a></li> -<li><a href="#_license">7.3. License</a></li> +<li><a href="#_philosophy">8.1. Philosophy</a></li> +<li><a href="#_procedure">8.2. Procedure</a></li> +<li><a href="#_license">8.3. License</a></li> </ul> </li> </ul> @@ -548,87 +544,88 @@ <h2 id="_introduction">1. Introduction</h2> <div class="paragraph"> <p>Category Theory abstractions for Clojure.</p> </div> -<div class="sect2"> -<h3 id="_why_another_library">1.1. Why another library?</h3> +</div> +</div> +<div class="sect1"> +<h2 id="_rationale">2. Rationale</h2> +<div class="sectionbody"> <div class="paragraph"> -<p>Because the cats library:</p> +<p>The main motivations for writting this library are:</p> </div> <div class="ulist"> <ul> <li> -<p>targets both of the most-used Clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> +<p>The existing libraries does not have support for ClojureScript.</p> </li> <li> -<p>aims to have the simplest implementation of the supported abstractions.</p> +<p>We do not intend to write a little haskell inside the clojure. We have adopted a +practical and clojure like approach, always with corectness in mind.</p> </li> <li> -<p>aims to have more abstractions that are simple monads.</p> +<p>We do not like viral/copyleft like licenses and with difference with other libraries +cats is licensed under BSD (2 clauses) license.</p> </li> <li> -<p>has documentation as first class citizen.</p> +<p>We do not intend implement only monads. Other category theory abstractions are also +first class in cats.</p> </li> +</ul> +</div> +<div class="paragraph"> +<p><strong>Alternatives:</strong></p> +</div> +<div class="ulist"> +<ul> <li> -<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> +<p><strong>algo.monads</strong>: This is the clojure official library for monads. Its approach for modeling +monads is slightly limited, only supports the monad abstraction and does not has support for +ClojureScript.</p> +</li> +<li> +<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on to be very practictical +without take care of corectness (as example, it extends clojure types with monadic abstractions +that not make sense). Also does not has support for ClojureScript.</p> +</li> +<li> +<p><strong>monads</strong>: is the most advanced monads library, supports also functors, applicatives and other +related abstractions. It lacks of good and readable documentation, fucused on correctness, has +haskell like sugar syntax (instead of clojure like syntax) and not has support for ClojureScript.</p> </li> </ul> </div> +<div class="paragraph"> +<p>All listed alternatives are licensed with EPL or similar licenses.</p> </div> </div> </div> <div class="sect1"> -<h2 id="_project_maturity">2. Project Maturity</h2> +<h2 id="_project_maturity">3. Project Maturity</h2> <div class="sectionbody"> <div class="paragraph"> -<p>Since <em>cats</em> is a young project, there can be some <a href="codox/index.html#id">API</a> breakage.</p> +<p>Since <em>cats</em> is a young project, there can be some <a href="api/index.html#id">API</a> breakage.</p> </div> </div> </div> <div class="sect1"> -<h2 id="_install">3. Install</h2> +<h2 id="_install">4. Install</h2> <div class="sectionbody"> <div class="paragraph"> <p>This section covers installing <em>cats</em>.</p> </div> <div class="sect2"> -<h3 id="_leiningen">3.1. Leiningen</h3> +<h3 id="_leiningen">4.1. Leiningen</h3> <div class="paragraph"> <p>The simplest way to use <em>cats</em> in a Clojure project is by including it as a dependency in your <strong><em>project.clj</em></strong>:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.4"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.4.0"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> <div class="sect2"> -<h3 id="_maven">3.2. Maven</h3> -<div class="paragraph"> -<p>Also, you can use it with Maven. First, add the Clojars repository:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> - <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> - <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> -<span class="tok-nt"></repository></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Then for cats:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> - <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> - <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.3.4<span class="tok-nt"></version></span> -<span class="tok-nt"></dependency></span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_get_the_code">3.3. Get the Code</h3> +<h3 id="_get_the_code">4.2. Get the Code</h3> <div class="paragraph"> <p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> </div> @@ -644,7 +641,7 @@ <h3 id="_get_the_code">3.3. Get the Code</h3> </div> </div> <div class="sect1"> -<h2 id="_user_guide">4. User Guide</h2> +<h2 id="_user_guide">5. User Guide</h2> <div class="sectionbody"> <div class="paragraph"> <p>This section introduces almost all the category theory abstractions that the <em>cats</em> library @@ -653,10 +650,10 @@ <h2 id="_user_guide">4. User Guide</h2> <div class="paragraph"> <p>We will use the <em>Maybe</em> for the example snippets, because it has support for all the abstractions and it is very easy to understand. You can read more about it in the next -section of the documentation.</p> +section of this documentation.</p> </div> <div class="sect2"> -<h3 id="_functor">4.1. Functor</h3> +<h3 id="_functor">5.1. Functor</h3> <div class="paragraph"> <p>Let’s start with the functor. The Functor represents some sort of "computational context", and the abstraction consists of one unique function: <strong>fmap</strong>.</p> @@ -664,7 +661,7 @@ <h3 id="_functor">4.1. Functor</h3> <div class="listingblock"> <div class="title">Signature of <strong>fmap</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> @@ -680,42 +677,25 @@ <h3 id="_functor">4.1. Functor</h3> <div class="listingblock"> <div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-c1">;; `just` function is one of two constructors of Maybe</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Just [2]></span></code></pre> </div> </div> <div class="paragraph"> -<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmap over <strong>just</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> +<p>The <code>just</code> function is a constructor of Just type that is part of Maybe monad.</p> </div> <div class="paragraph"> -<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to -extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> </div> <div class="listingblock"> -<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="title">Example using fmap over <strong>just</strong> instance.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">from-maybe</span><span class="tok-p">]])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => 1</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => nil</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span></code></pre> +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> </div> </div> <div class="paragraph"> @@ -723,12 +703,13 @@ <h3 id="_functor">4.1. Functor</h3> It is a safe substitute for <code>nil</code> and may represent failure.</p> </div> <div class="paragraph"> -<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> instance:</p> +<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> +instance:</p> </div> <div class="listingblock"> <div class="title">Example using fmap over <strong>nothing</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> @@ -743,7 +724,7 @@ <h3 id="_functor">4.1. Functor</h3> <div class="listingblock"> <div class="title">Example using fmav over <strong>vector</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 3 4]</span></code></pre> </div> </div> @@ -753,20 +734,20 @@ <h3 id="_functor">4.1. Functor</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> <span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> </div> </div> <div class="paragraph"> -<p>But why can we pass vectors to fmap? Because some Clojure container types like vectors, -lists and sets also implement the functor abstraction.</p> +<p>But why can we pass vectors to <code>fmap</code> function? Because some Clojure container types like vectors, +lists and sets, also implement the functor abstraction.</p> </div> </div> <div class="sect2"> -<h3 id="_applicative">4.2. Applicative</h3> +<h3 id="_applicative">5.2. Applicative</h3> <div class="paragraph"> <p>Let’s continue with applicative functors. The Applicative Functor represents -some sort of "computational context" like a plain Functor, but with abilty to +some sort of "computational context" like a plain Functor, but with ability to execute a function wrapped in the same context.</p> </div> <div class="paragraph"> @@ -776,7 +757,7 @@ <h3 id="_applicative">4.2. Applicative</h3> <div class="listingblock"> <div class="title">Signature of <strong>fapply</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="admonitionblock note"> @@ -805,7 +786,7 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> @@ -822,7 +803,7 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> @@ -837,7 +818,7 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just [Hola Alex]></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> @@ -856,14 +837,10 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [5]></span> - -<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> +<span class="tok-c1">;; => #<Just [5]></span></code></pre> </div> </div> <div class="paragraph"> @@ -872,7 +849,7 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> </div> <div class="sect2"> -<h3 id="_monad">4.3. Monad</h3> +<h3 id="_monad">5.3. Monad</h3> <div class="paragraph"> <p>Monads are the most discussed programming concept to come from category theory. Like functors and applicatives, monads deal with data in contexts.</p> @@ -887,7 +864,7 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Bind function signature.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> @@ -897,8 +874,9 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Example usage of the bind higher-order function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<span class="tok-c1">;; => #<Just [2]></span></code></pre> </div> </div> <div class="paragraph"> @@ -910,9 +888,9 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Usage of return function in bind context.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> <span class="tok-c1">;; => #<Just [2]></span></code></pre> </div> </div> @@ -921,17 +899,17 @@ <h3 id="_monad">4.3. Monad</h3> value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> </div> <div class="paragraph"> -<p>We now can compose any number of computations using monad <strong>*bind</strong> +<p>We now can compose any number of computations using monad <strong>bind</strong> functions. But observe what happens when the number of computations increases:</p> </div> <div class="listingblock"> <div class="title">Composability example of bind function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> </div> </div> <div class="paragraph"> @@ -941,9 +919,9 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Previous example but using <strong>mlet</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> <div class="admonitionblock note"> @@ -964,27 +942,27 @@ <h3 id="_monad">4.3. Monad</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> </div> <div class="sect2"> -<h3 id="_monad_transformers">4.4. Monad Transformers</h3> +<h3 id="_monad_transformers">5.4. Monad Transformers</h3> <div class="sect3"> -<h4 id="_motivation">4.4.1. Motivation</h4> +<h4 id="_motivation">5.4.1. Motivation</h4> <div class="paragraph"> <p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> + <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]]))</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> @@ -1008,11 +986,11 @@ <h4 id="_motivation">4.4.1. Motivation</h4> </div> </div> <div class="sect3"> -<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> +<h4 id="_using_monad_transformers">5.4.2. Using monad transformers</h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad since we want the resulting type to be a stateful computation -that may fail: <code>s -> Maybe (a, s)</code>.</p> +that may fail: <code>s → Maybe (a, s)</code>.</p> </div> <div class="paragraph"> <p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with @@ -1021,18 +999,18 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> - -<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> +<span class="tok-c1">;; => #<Just [#<Pair [42 {}]>]></span></code></pre> </div> </div> <div class="paragraph"> @@ -1048,119 +1026,81 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> <div class="paragraph"> <p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> </div> -<div class="paragraph"> -<p>Let’s see it in action:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> - <span class="tok-s">"A function that takes an input string as an state and</span> -<span class="tok-s"> consumes one character yielding it as a the value. The</span> -<span class="tok-s"> new state is the input string with the character consumed.</span> - -<span class="tok-s"> It fails when there isn't a character to consume."</span> - <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">Clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Nothing ></span> - -<span class="tok-c1">; We could have written `any-two-chars` more succinctly by using `cats.core/mlet-with`,</span> -<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> - -<span class="tok-c1">; We also define a function for applying parser to a given input</span> -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> -</div> -</div> </div> </div> </div> </div> <div class="sect1"> -<h2 id="_monad_types">5. Monad types</h2> +<h2 id="_monad_types">6. Monad types</h2> <div class="sectionbody"> -<div class="paragraph"> -<p>In our examples we have seen two types that implement -the monad abstraction: Maybe and Either. But these are only two of the types -that implements the Monad abstraction. In this section, we will explain the different -monad types supported by <em>cats</em> library.</p> -</div> <div class="sect2"> -<h3 id="_maybe">5.1. Maybe</h3> +<h3 id="_maybe">6.1. Maybe</h3> <div class="paragraph"> -<p>This is one of the two most used monad types (also named Optional in other programming +<p>This is one of the two most used monad types (also known as Optional in other programming languages).</p> </div> <div class="paragraph"> -<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is -used as the return type of functions which may or may not return a meaningful value when they -are applied. It consists of either an empty constructor (called None or Nothing), or a constructor +<p>Maybe monad represents encapsulation of an optional value; e.g. it is used as the return type +of functions which may or may not return a meaningful value when they are applied. It consists +of either an empty constructor (called None or Nothing), or a constructor encapsulating the original data type A (written Just A or Some A).</p> </div> <div class="paragraph"> -<p><em>cats</em>, implements two constructors:</p> +<p><em>cats</em>, implements two types:</p> </div> <div class="ulist"> <ul> <li> -<p><code>(just v)</code>: represents just a value in a context.</p> +<p><code>Just</code> that represents just a value in a context.</p> </li> <li> -<p><code>(nothing)</code>: represents a failure or null.</p> +<p><code>Nothing</code> that represents the abscense of value.</p> </li> </ul> </div> <div class="listingblock"> -<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> +<div class="title">Example creating instances of <code>Just</code> and <code>Nothing</code> types</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Just [1]></span> -<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Maybe types are: Functors, Applicative Functors and Monads -</td> -</tr> -</table> +<div class="paragraph"> +<p>In the same ns, it there other usefull functions for work with maybe monad types. See the api +documentation for see a full list of them. But here we will exaplain a little relevant subset +of they.</p> +</div> +<div class="paragraph"> +<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to +extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +</div> +<div class="paragraph"> +<p>The Just or Nothing instances as we said previously, acts like a wrappers and in some circumstances +you will want extract the plain value from them. For it, cats offers the <code>from-maybe</code> function.</p> +</div> +<div class="listingblock"> +<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>from-maybe</code> function is a specialized version more generic one: <code>cats.core/extract</code>. The generic +version is a polymorphic function and will work also with different types of different monads.</p> </div> </div> <div class="sect2"> -<h3 id="_either">5.2. Either</h3> +<h3 id="_either">6.2. Either</h3> <div class="paragraph"> <p>Either is another type that represents a result of computation, but (in contrast with maybe) it can return some data with a failed computation result.</p> @@ -1181,7 +1121,7 @@ <h3 id="_either">5.2. Either</h3> <div class="listingblock"> <div class="title">Usage example of <strong>Either</strong> constructors.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Right [:valid-value :right]></span> @@ -1204,25 +1144,32 @@ <h3 id="_either">5.2. Either</h3> </div> </div> <div class="sect2"> -<h3 id="_try">5.3. Try</h3> +<h3 id="_exception">6.3. Exception</h3> +<div class="paragraph"> +<p>Also known as Try monad, popularized by Scala.</p> +</div> +<div class="paragraph"> +<p>It represents a computation that may either result in an exception or return a successfully computed +value. Is very similar to Either monad, but is semantically different.</p> +</div> <div class="paragraph"> -<p>Also called Exception.</p> +<p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of +Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an +instance of Throwable (or Error in cljs).</p> </div> <div class="paragraph"> -<p>The <code>Try</code> type represents a computation that may either result in an exception -or return a successfully computed value. It’s similar to, but semantically -different from, the <code>Either</code> type.</p> +<p>The most common use case of this monad is for wrap third party libraries that uses standard Exception +based error handling. In normal circumstances you should use Either instead.</p> </div> <div class="paragraph"> -<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error -handling with heap-based error handling. Instead of having an exception thrown and -having to deal with it immediately in the same thread, it disconnects the error -handling and recovery.</p> +<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error handling with +heap-based error handling. Instead of having an exception thrown and having to deal with it immediately +in the same thread, it disconnects the error handling and recovery.</p> </div> <div class="listingblock"> <div class="title">Usage example of <strong>try-on</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [1]></span> @@ -1232,22 +1179,21 @@ <h3 id="_try">5.3. Try</h3> </div> </div> <div class="paragraph"> -<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that -returns a default value if a computation fails, and <code>try-or-recover</code> that lets -you handle the return value when executing a function with the exception as -first parameter.</p> +<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that returns a default value if a +computation fails, and <code>try-or-recover</code> that lets you handle the return value when executing a +function with the exception as first parameter.</p> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-else</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [2]></span></code></pre> </div> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-recover</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">cond</span> <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> @@ -1255,21 +1201,27 @@ <h3 id="_try">5.3. Try</h3> <span class="tok-c1">;; => #<Success [0]></span></code></pre> </div> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Try is also (like Maybe) Functor, Applicative Functor and Monad. -</td> -</tr> -</table> +<div class="paragraph"> +<p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref +interface, which facilitates libraries developing using monadic composition without forcing a user of +that library to use or understand monads.</p> +</div> +<div class="paragraph"> +<p>That is because when you will dereference the failure instance, it will reraise the containing +exception.</p> +</div> +<div class="listingblock"> +<div class="title">Example dereferencing a failure instance</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">f</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)))</span> + +<span class="tok-o">@</span><span class="tok-nv">f</span> +<span class="tok-c1">;; => NullPointerException clojure.lang.Numbers.ops (Numbers.java:961)</span></code></pre> +</div> </div> </div> <div class="sect2"> -<h3 id="_state">5.4. State</h3> +<h3 id="_state">6.4. State</h3> <div class="paragraph"> <p>State monad in one of the special cases of monads most used in Haskell. It has different purposes including: lazy computation, composition, and maintaining state without explicit state.</p> @@ -1282,7 +1234,7 @@ <h3 id="_state">5.4. State</h3> <div class="listingblock"> <div class="title">Valid function for valid state monad</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> <span class="tok-s">"Takes state as argument and return a vector</span> <span class="tok-s"> with first argument with procesed value and</span> <span class="tok-s"> second argument the transformed new state."</span> @@ -1301,19 +1253,20 @@ <h3 id="_state">5.4. State</h3> <div class="listingblock"> <div class="title">Lazy composition of computations</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> - <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">st</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">st/get-state</span><span class="tok-p">)</span> + <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">st/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> <span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> </div> </div> <div class="paragraph"> -<p>At the moment of evaluation in the previous expression, anything that we have defined +<p>At the moment of evaluation in the previous expression, nothing of that we have defined is executed. But instead of returning the unadorned final value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p> </div> <div class="paragraph"> -<p>State is simply a wrapper for Clojure functions, nothing more.</p> +<p>The State type is simply a wrapper for Clojure functions, nothing more.</p> </div> <div class="paragraph"> <p>Now, it’s time to execute the composed computation. For this we can use one of the following @@ -1336,94 +1289,68 @@ <h3 id="_state">5.4. State</h3> </ul> </div> <div class="listingblock"> -<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> +<div class="title">Example of resuls of using the previosly listed functions</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> + <span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> 1</span> + <span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> (2 3)</span></code></pre> </div> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -the pair instance returned by <code>run-state</code> function works like any other seq in Clojure, with -the difference that pairs can only have two slots. -</td> -</tr> -</table> -</div> <div class="paragraph"> -<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them -seems out of the scope of this document.</p> -</div> -<div class="paragraph"> -<p>However, if you have better examples to explain the state monad, documentation for another monad or -any other contribution is always welcome.</p> +<p>The <code>run-state</code> function returns an instance of Pair type. The Pair type acts like any other seq in +clojure with the exception that it only can contain two values.</p> </div> </div> <div class="sect2"> -<h3 id="_reader">5.5. Reader</h3> +<h3 id="_reader">6.5. Reader</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_writer">5.6. Writer</h3> +<h3 id="_writer">6.6. Writer</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_continuation">5.7. Continuation</h3> +<h3 id="_continuation">6.7. Continuation</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_vector">5.8. Vector</h3> +<h3 id="_vector">6.8. Vector</h3> <div class="paragraph"> <p>TODO</p> </div> </div> -</div> -</div> -<div class="sect1"> -<h2 id="_faq">6. FAQ</h2> -<div class="sectionbody"> <div class="sect2"> -<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> +<h3 id="_other_monads">6.9. Other monads</h3> <div class="paragraph"> -<p>This is an incomplete list of differences with other existing libraries:</p> +<p>Some monads are defined as separated package for avoid add additional +and unnecesary dependencies to cats library.</p> </div> <div class="ulist"> <ul> <li> -<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling -is slighty limited (e.g. you always need to specify what monad you want use instead of -relying on the type). And obviously because it only has monads.</p> -</li> -<li> -<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big -difference with fluokitten is that <code>cats</code> doesn’t aim to extend every Clojure type -with monadic protocols, for the obvious reason that monad; functor and applicative represents -context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> -</li> -<li> -<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation -has much unnecesary complexity.</p> +<p>Channel monad: <a href="https://github.com/funcool/cats-channel" class="bare">https://github.com/funcool/cats-channel</a></p> </li> </ul> </div> </div> +</div> +</div> +<div class="sect1"> +<h2 id="_faq">7. FAQ</h2> +<div class="sectionbody"> <div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</h3> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</h3> <div class="paragraph"> <p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types that don’t act like containers. For example, Clojure keywords are values but can not be containers so @@ -1460,10 +1387,10 @@ <h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions" </div> </div> <div class="sect1"> -<h2 id="_how_to_contribute">7. How to Contribute?</h2> +<h2 id="_how_to_contribute">8. How to Contribute?</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_philosophy">7.1. Philosophy</h3> +<h3 id="_philosophy">8.1. Philosophy</h3> <div class="paragraph"> <p>Five most important rules:</p> </div> @@ -1491,7 +1418,7 @@ <h3 id="_philosophy">7.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_procedure">7.2. Procedure</h3> +<h3 id="_procedure">8.2. Procedure</h3> <div class="paragraph"> <p><em>cats</em> does not have many restrictions for contributions. Just follow these steps depending on the situation:</p> @@ -1527,7 +1454,7 @@ <h3 id="_procedure">7.2. Procedure</h3> </div> </div> <div class="sect2"> -<h3 id="_license">7.3. License</h3> +<h3 id="_license">8.3. License</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> @@ -1563,7 +1490,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-03-14 16:38:38 CET +Last updated 2015-03-25 20:42:52 CET </div> </div> </body> From 782cc2cbd48b2964575e241f179a6b11a6457bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Sat, 4 Apr 2015 00:04:23 +0200 Subject: [PATCH 39/52] Update devel docs --- devel/index.html | 723 +++++++++++++++++++++++------------------------ 1 file changed, 356 insertions(+), 367 deletions(-) diff --git a/devel/index.html b/devel/index.html index 5e6e92f..162a622 100644 --- a/devel/index.html +++ b/devel/index.html @@ -480,56 +480,57 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.4.0-SNAPSHOT</span> +<span id="revdate">0.4.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> <ul class="sectlevel1"> -<li><a href="#_introduction">1. Introduction</a> +<li><a href="#_introduction">1. Introduction</a></li> +<li><a href="#_rationale">2. Rationale</a></li> +<li><a href="#_project_maturity">3. Project Maturity</a></li> +<li><a href="#_install">4. Install</a> <ul class="sectlevel2"> -<li><a href="#_why_another_library">1.1. Why another library?</a></li> +<li><a href="#_leiningen">4.1. Leiningen</a></li> +<li><a href="#_get_the_code">4.2. Get the Code</a></li> </ul> </li> -<li><a href="#_project_maturity">2. Project Maturity</a></li> -<li><a href="#_install">3. Install</a> +<li><a href="#_user_guide">5. User Guide</a> <ul class="sectlevel2"> -<li><a href="#_leiningen">3.1. Leiningen</a></li> -<li><a href="#_maven">3.2. Maven</a></li> -<li><a href="#_get_the_code">3.3. Get the Code</a></li> +<li><a href="#_semigroup">5.1. Semigroup</a></li> +<li><a href="#_monoid">5.2. Monoid</a></li> +<li><a href="#_functor">5.3. Functor</a></li> +<li><a href="#_applicative">5.4. Applicative</a></li> +<li><a href="#_monad">5.5. Monad</a></li> +<li><a href="#_monad_transformers">5.6. Monad Transformers</a></li> </ul> </li> -<li><a href="#_user_guide">4. User Guide</a> +<li><a href="#_types">6. Types</a> <ul class="sectlevel2"> -<li><a href="#_functor">4.1. Functor</a></li> -<li><a href="#_applicative">4.2. Applicative</a></li> -<li><a href="#_monad">4.3. Monad</a></li> -<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> +<li><a href="#_maybe">6.1. Maybe</a></li> +<li><a href="#_either">6.2. Either</a></li> +<li><a href="#_exception">6.3. Exception</a></li> +<li><a href="#_state">6.4. State</a></li> +<li><a href="#_reader">6.5. Reader</a></li> +<li><a href="#_writer">6.6. Writer</a></li> +<li><a href="#_continuation">6.7. Continuation</a></li> +<li><a href="#_lazy_sequences">6.8. Lazy sequences</a></li> +<li><a href="#_vector">6.9. Vector</a></li> +<li><a href="#_set">6.10. Set</a></li> +<li><a href="#_map">6.11. Map</a></li> +<li><a href="#_validation">6.12. Validation</a></li> +<li><a href="#_complementary_libraries">6.13. Complementary libraries</a></li> </ul> </li> -<li><a href="#_monad_types">5. Monad types</a> +<li><a href="#_faq">7. FAQ</a> <ul class="sectlevel2"> -<li><a href="#_maybe">5.1. Maybe</a></li> -<li><a href="#_either">5.2. Either</a></li> -<li><a href="#_try">5.3. Try</a></li> -<li><a href="#_state">5.4. State</a></li> -<li><a href="#_channel">5.5. Channel</a></li> -<li><a href="#_reader">5.6. Reader</a></li> -<li><a href="#_writer">5.7. Writer</a></li> -<li><a href="#_continuation">5.8. Continuation</a></li> -<li><a href="#_vector">5.9. Vector</a></li> +<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</a></li> </ul> </li> -<li><a href="#_faq">6. FAQ</a> +<li><a href="#_how_to_contribute">8. How to Contribute?</a> <ul class="sectlevel2"> -<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</a></li> -</ul> -</li> -<li><a href="#_how_to_contribute">7. How to Contribute?</a> -<ul class="sectlevel2"> -<li><a href="#_philosophy">7.1. Philosophy</a></li> -<li><a href="#_procedure">7.2. Procedure</a></li> -<li><a href="#_license">7.3. License</a></li> +<li><a href="#_philosophy">8.1. Philosophy</a></li> +<li><a href="#_procedure">8.2. Procedure</a></li> +<li><a href="#_license">8.3. License</a></li> </ul> </li> </ul> @@ -547,37 +548,64 @@ <h1>Cats Documentation</h1> <h2 id="_introduction">1. Introduction</h2> <div class="sectionbody"> <div class="paragraph"> -<p>Category Theory abstractions for Clojure.</p> +<p>Category Theory and algebraic abstractions for Clojure.</p> </div> -<div class="sect2"> -<h3 id="_why_another_library">1.1. Why another library?</h3> +</div> +</div> +<div class="sect1"> +<h2 id="_rationale">2. Rationale</h2> +<div class="sectionbody"> <div class="paragraph"> -<p>Because the cats library:</p> +<p>The main motivations for writting this library are:</p> </div> <div class="ulist"> <ul> <li> -<p>targets both of the most-used Clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> +<p>The existing libraries do not have support for ClojureScript.</p> </li> <li> -<p>aims to have the simplest implementation of the supported abstractions.</p> +<p>We do not intend to write a little haskell inside Clojure. We have adopted a +practical and clojure like approach, always with corectness in mind.</p> </li> <li> -<p>aims to have more abstractions that are simple monads.</p> +<p>We do not like viral/copyleft like licenses and with difference with other libraries +cats is licensed under BSD (2 clauses) license.</p> </li> <li> -<p>has documentation as first class citizen.</p> +<p>We do not intend implement only monads. Other category theory and algebraic abstractions are also +first class in cats.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p><strong>Alternatives:</strong></p> +</div> +<div class="ulist"> +<ul> +<li> +<p><strong>algo.monads</strong>: This is the clojure official library for monads. Its approach for modeling +monads is slightly limited, only supports the monad abstraction and does not has support for +ClojureScript.</p> </li> <li> -<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> +<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on to be very practictical +without take care of corectness (as example, it extends clojure types with monadic abstractions +that not make sense). Also does not has support for ClojureScript.</p> +</li> +<li> +<p><strong>monads</strong>: is the most advanced monads library, supports also functors, applicatives and other +related abstractions. It lacks of good and readable documentation, fucused on correctness, has +haskell like sugar syntax (instead of clojure like syntax) and not has support for ClojureScript.</p> </li> </ul> </div> +<div class="paragraph"> +<p>All listed alternatives are licensed with EPL or similar licenses.</p> </div> </div> </div> <div class="sect1"> -<h2 id="_project_maturity">2. Project Maturity</h2> +<h2 id="_project_maturity">3. Project Maturity</h2> <div class="sectionbody"> <div class="paragraph"> <p>Since <em>cats</em> is a young project, there can be some <a href="api/index.html#id">API</a> breakage.</p> @@ -585,87 +613,112 @@ <h2 id="_project_maturity">2. Project Maturity</h2> </div> </div> <div class="sect1"> -<h2 id="_install">3. Install</h2> +<h2 id="_install">4. Install</h2> <div class="sectionbody"> <div class="paragraph"> <p>This section covers installing <em>cats</em>.</p> </div> <div class="sect2"> -<h3 id="_leiningen">3.1. Leiningen</h3> +<h3 id="_leiningen">4.1. Leiningen</h3> <div class="paragraph"> <p>The simplest way to use <em>cats</em> in a Clojure project is by including it as a dependency in your <strong><em>project.clj</em></strong>:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.4.0-SNAPSHOT"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.4.0"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> <div class="sect2"> -<h3 id="_maven">3.2. Maven</h3> +<h3 id="_get_the_code">4.2. Get the Code</h3> <div class="paragraph"> -<p>Also, you can use it with Maven. First, add the Clojars repository:</p> +<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> +</div> +<div class="paragraph"> +<p>You can clone the public repository with this command:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> - <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> - <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> -<span class="tok-nt"></repository></span></code></pre> +<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> </div> </div> -<div class="paragraph"> -<p>Then for cats:</p> </div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> - <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> - <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.4.0-SNAPSHOT<span class="tok-nt"></version></span> -<span class="tok-nt"></dependency></span></code></pre> </div> </div> +<div class="sect1"> +<h2 id="_user_guide">5. User Guide</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section introduces almost all the category theory and algebraic abstractions that the <em>cats</em> library +supports.</p> </div> -<div class="sect2"> -<h3 id="_get_the_code">3.3. Get the Code</h3> <div class="paragraph"> -<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> +<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all +the abstractions and it is very easy to understand. You can read more about it in the next +section of this documentation.</p> </div> +<div class="sect2"> +<h3 id="_semigroup">5.1. Semigroup</h3> <div class="paragraph"> -<p>You can clone the public repository with this command:</p> +<p>A semigroup is an algebraic structure with an associative binary operation (<code>mappend</code>). Most of the builtin collections +form a semigroup because its associative binary operation is analogous to Clojure’s <code>into</code>.</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [1 2 3 4 5 6]</span></code></pre> +</div> </div> +<div class="paragraph"> +<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple <em>Maybe</em> values.</p> </div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Just [1 2 3 4 5 6]></span></code></pre> </div> </div> </div> -<div class="sect1"> -<h2 id="_user_guide">4. User Guide</h2> -<div class="sectionbody"> +<div class="sect2"> +<h3 id="_monoid">5.2. Monoid</h3> <div class="paragraph"> -<p>This section introduces almost all the category theory abstractions that the <em>cats</em> library -supports.</p> +<p>A Monoid is a Semigroup with an identity element (<code>mempty</code>). For the collection types the <code>mempty</code> +function is analogous to Clojure’s <code>empty</code>.</p> </div> <div class="paragraph"> -<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all -the abstractions and it is very easy to understand. You can read more about it in the next -section of the documentation.</p> +<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple <em>Maybe</em>, Nothing being +the identity element.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [1 2 3 4 5 6]></span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_functor">4.1. Functor</h3> +<h3 id="_functor">5.3. Functor</h3> <div class="paragraph"> -<p>Let’s start with the functor. The Functor represents some sort of "computational context", and the +<p>Let’s dive into the functor. The Functor represents some sort of "computational context", and the abstraction consists of one unique function: <strong>fmap</strong>.</p> </div> <div class="listingblock"> <div class="title">Signature of <strong>fmap</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> @@ -681,42 +734,25 @@ <h3 id="_functor">4.1. Functor</h3> <div class="listingblock"> <div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-c1">;; `just` function is one of two constructors of Maybe</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> -<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmap over <strong>just</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> +<p>The <code>just</code> function is a constructor of Just type that is part of Maybe monad.</p> </div> <div class="paragraph"> -<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to -extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> </div> <div class="listingblock"> -<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="title">Example using fmap over <strong>just</strong> instance.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">from-maybe</span><span class="tok-p">]])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => 1</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => nil</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span></code></pre> +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> @@ -730,7 +766,7 @@ <h3 id="_functor">4.1. Functor</h3> <div class="listingblock"> <div class="title">Example using fmap over <strong>nothing</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> @@ -745,7 +781,7 @@ <h3 id="_functor">4.1. Functor</h3> <div class="listingblock"> <div class="title">Example using fmav over <strong>vector</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 3 4]</span></code></pre> </div> </div> @@ -755,17 +791,17 @@ <h3 id="_functor">4.1. Functor</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> <span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> </div> </div> <div class="paragraph"> -<p>But why can we pass vectors to fmap? Because some Clojure container types like vectors, -lists and sets also implement the functor abstraction.</p> +<p>But why can we pass vectors to <code>fmap</code> function? Because some Clojure container types like vectors, +lists and sets, also implement the functor abstraction.</p> </div> </div> <div class="sect2"> -<h3 id="_applicative">4.2. Applicative</h3> +<h3 id="_applicative">5.4. Applicative</h3> <div class="paragraph"> <p>Let’s continue with applicative functors. The Applicative Functor represents some sort of "computational context" like a plain Functor, but with ability to @@ -778,7 +814,7 @@ <h3 id="_applicative">4.2. Applicative</h3> <div class="listingblock"> <div class="title">Signature of <strong>fapply</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="admonitionblock note"> @@ -807,7 +843,7 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> @@ -824,7 +860,7 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> @@ -839,11 +875,11 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hola Alex]></span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just "Hola Alex"></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hello Alex]></span> +<span class="tok-c1">;; => #<Just "Hello Alex"></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> @@ -858,14 +894,10 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [5]></span> - -<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> +<span class="tok-c1">;; => #<Just 5></span></code></pre> </div> </div> <div class="paragraph"> @@ -874,7 +906,7 @@ <h3 id="_applicative">4.2. Applicative</h3> </div> </div> <div class="sect2"> -<h3 id="_monad">4.3. Monad</h3> +<h3 id="_monad">5.5. Monad</h3> <div class="paragraph"> <p>Monads are the most discussed programming concept to come from category theory. Like functors and applicatives, monads deal with data in contexts.</p> @@ -889,7 +921,7 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Bind function signature.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> @@ -899,8 +931,9 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Example usage of the bind higher-order function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> @@ -912,10 +945,10 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Usage of return function in bind context.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> @@ -929,11 +962,11 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Composability example of bind function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> </div> </div> <div class="paragraph"> @@ -943,9 +976,9 @@ <h3 id="_monad">4.3. Monad</h3> <div class="listingblock"> <div class="title">Previous example but using <strong>mlet</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> <div class="admonitionblock note"> @@ -966,27 +999,27 @@ <h3 id="_monad">4.3. Monad</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> </div> <div class="sect2"> -<h3 id="_monad_transformers">4.4. Monad Transformers</h3> +<h3 id="_monad_transformers">5.6. Monad Transformers</h3> <div class="sect3"> -<h4 id="_motivation">4.4.1. Motivation</h4> +<h4 id="_motivation">5.6.1. Motivation</h4> <div class="paragraph"> <p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> + <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]]))</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> @@ -996,7 +1029,7 @@ <h4 id="_motivation">4.4.1. Motivation</h4> <span class="tok-c1">; combined functor is a vector of Maybe values that could</span> <span class="tok-c1">; contain a value of any type.</span> <span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> -<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> +<span class="tok-c1">;;=> [#<Just 2> #<Just 3>]</span></code></pre> </div> </div> <div class="paragraph"> @@ -1010,7 +1043,7 @@ <h4 id="_motivation">4.4.1. Motivation</h4> </div> </div> <div class="sect3"> -<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> +<h4 id="_using_monad_transformers">5.6.2. Using monad transformers</h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad since we want the resulting type to be a stateful computation @@ -1023,18 +1056,18 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> + <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> - -<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> +<span class="tok-c1">;; => #<Just #<Pair [42 {}]>></span></code></pre> </div> </div> <div class="paragraph"> @@ -1050,107 +1083,81 @@ <h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> <div class="paragraph"> <p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> </div> -<div class="paragraph"> -<p>Let’s see it in action:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> - <span class="tok-s">"A function that takes an input string as an state and</span> -<span class="tok-s"> consumes one character yielding it as a the value. The</span> -<span class="tok-s"> new state is the input string with the character consumed.</span> - -<span class="tok-s"> It fails when there isn't a character to consume."</span> - <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">Clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Nothing ></span> - -<span class="tok-c1">; We could have written `any-two-chars` more succinctly by using `cats.core/mlet-with`,</span> -<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> - -<span class="tok-c1">; We also define a function for applying parser to a given input</span> -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> -</div> -</div> </div> </div> </div> </div> <div class="sect1"> -<h2 id="_monad_types">5. Monad types</h2> +<h2 id="_types">6. Types</h2> <div class="sectionbody"> -<div class="paragraph"> -<p>In our examples we have seen two types that implement -the monad abstraction: Maybe and Either. But these are only two of the types -that implements the Monad abstraction. In this section, we will explain the different -monad types supported by <em>cats</em> library.</p> -</div> <div class="sect2"> -<h3 id="_maybe">5.1. Maybe</h3> +<h3 id="_maybe">6.1. Maybe</h3> <div class="paragraph"> -<p>This is one of the two most used monad types (also named Optional in other programming +<p>This is one of the two most used monad types (also known as Optional in other programming languages).</p> </div> <div class="paragraph"> -<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is -used as the return type of functions which may or may not return a meaningful value when they -are applied. It consists of either an empty constructor (called None or Nothing), or a constructor +<p>Maybe monad represents encapsulation of an optional value; e.g. it is used as the return type +of functions which may or may not return a meaningful value when they are applied. It consists +of either an empty constructor (called None or Nothing), or a constructor encapsulating the original data type A (written Just A or Some A).</p> </div> <div class="paragraph"> -<p><em>cats</em>, implements two constructors:</p> +<p><em>cats</em>, implements two types:</p> </div> <div class="ulist"> <ul> <li> -<p><code>(just v)</code>: represents just a value in a context.</p> +<p><code>Just</code> that represents just a value in a context.</p> </li> <li> -<p><code>(nothing)</code>: represents a failure or null.</p> +<p><code>Nothing</code> that represents the abscense of value.</p> </li> </ul> </div> <div class="listingblock"> -<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> +<div class="title">Example creating instances of <code>Just</code> and <code>Nothing</code> types</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [1]></span> -<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Just 1></span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> +<div class="paragraph"> +<p>In the same ns, it there other usefull functions for work with maybe monad types. See the api +documentation for see a full list of them. But here we will exaplain a little relevant subset +of they.</p> +</div> +<div class="paragraph"> +<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to +extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +</div> +<div class="paragraph"> +<p>The Just or Nothing instances as we said previously, acts like a wrappers and in some circumstances +you will want extract the plain value from them. For it, cats offers the <code>from-maybe</code> function.</p> +</div> +<div class="listingblock"> +<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span> + +<span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>from-maybe</code> function is a specialized version more generic one: <code>cats.core/extract</code>. The generic +version is a polymorphic function and will work also with different types of different monads.</p> +</div> </div> <div class="sect2"> -<h3 id="_either">5.2. Either</h3> +<h3 id="_either">6.2. Either</h3> <div class="paragraph"> <p>Either is another type that represents a result of computation, but (in contrast with maybe) it can return some data with a failed computation result.</p> @@ -1171,7 +1178,7 @@ <h3 id="_either">5.2. Either</h3> <div class="listingblock"> <div class="title">Usage example of <strong>Either</strong> constructors.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Right [:valid-value :right]></span> @@ -1194,25 +1201,32 @@ <h3 id="_either">5.2. Either</h3> </div> </div> <div class="sect2"> -<h3 id="_try">5.3. Try</h3> +<h3 id="_exception">6.3. Exception</h3> +<div class="paragraph"> +<p>Also known as Try monad, popularized by Scala.</p> +</div> <div class="paragraph"> -<p>Also called Exception.</p> +<p>It represents a computation that may either result in an exception or return a successfully computed +value. Is very similar to Either monad, but is semantically different.</p> </div> <div class="paragraph"> -<p>The <code>Try</code> type represents a computation that may either result in an exception -or return a successfully computed value. It’s similar to, but semantically -different from, the <code>Either</code> type.</p> +<p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of +Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an +instance of Throwable (or Error in cljs).</p> </div> <div class="paragraph"> -<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error -handling with heap-based error handling. Instead of having an exception thrown and -having to deal with it immediately in the same thread, it disconnects the error -handling and recovery.</p> +<p>The most common use case of this monad is for wrap third party libraries that uses standard Exception +based error handling. In normal circumstances you should use Either instead.</p> +</div> +<div class="paragraph"> +<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error handling with +heap-based error handling. Instead of having an exception thrown and having to deal with it immediately +in the same thread, it disconnects the error handling and recovery.</p> </div> <div class="listingblock"> <div class="title">Usage example of <strong>try-on</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [1]></span> @@ -1222,22 +1236,21 @@ <h3 id="_try">5.3. Try</h3> </div> </div> <div class="paragraph"> -<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that -returns a default value if a computation fails, and <code>try-or-recover</code> that lets -you handle the return value when executing a function with the exception as -first parameter.</p> +<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that returns a default value if a +computation fails, and <code>try-or-recover</code> that lets you handle the return value when executing a +function with the exception as first parameter.</p> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-else</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [2]></span></code></pre> </div> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-recover</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">cond</span> <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> @@ -1245,9 +1258,27 @@ <h3 id="_try">5.3. Try</h3> <span class="tok-c1">;; => #<Success [0]></span></code></pre> </div> </div> +<div class="paragraph"> +<p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref +interface, which facilitates libraries developing using monadic composition without forcing a user of +that library to use or understand monads.</p> +</div> +<div class="paragraph"> +<p>That is because when you will dereference the failure instance, it will reraise the containing +exception.</p> +</div> +<div class="listingblock"> +<div class="title">Example dereferencing a failure instance</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">f</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)))</span> + +<span class="tok-o">@</span><span class="tok-nv">f</span> +<span class="tok-c1">;; => NullPointerException clojure.lang.Numbers.ops (Numbers.java:961)</span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_state">5.4. State</h3> +<h3 id="_state">6.4. State</h3> <div class="paragraph"> <p>State monad in one of the special cases of monads most used in Haskell. It has different purposes including: lazy computation, composition, and maintaining state without explicit state.</p> @@ -1260,7 +1291,7 @@ <h3 id="_state">5.4. State</h3> <div class="listingblock"> <div class="title">Valid function for valid state monad</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> <span class="tok-s">"Takes state as argument and return a vector</span> <span class="tok-s"> with first argument with procesed value and</span> <span class="tok-s"> second argument the transformed new state."</span> @@ -1279,19 +1310,20 @@ <h3 id="_state">5.4. State</h3> <div class="listingblock"> <div class="title">Lazy composition of computations</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> - <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">st</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">st/get-state</span><span class="tok-p">)</span> + <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">st/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> <span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> </div> </div> <div class="paragraph"> -<p>At the moment of evaluation in the previous expression, anything that we have defined +<p>At the moment of evaluation in the previous expression, nothing of that we have defined is executed. But instead of returning the unadorned final value of the computation, a strange/unknown object is returned of type <strong>State</strong>.</p> </div> <div class="paragraph"> -<p>State is simply a wrapper for Clojure functions, nothing more.</p> +<p>The State type is simply a wrapper for Clojure functions, nothing more.</p> </div> <div class="paragraph"> <p>Now, it’s time to execute the composed computation. For this we can use one of the following @@ -1314,177 +1346,130 @@ <h3 id="_state">5.4. State</h3> </ul> </div> <div class="listingblock"> -<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> +<div class="title">Example of resuls of using the previosly listed functions</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> + <span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> 1</span> + <span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;;=> (2 3)</span></code></pre> </div> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -the pair instance returned by <code>run-state</code> function works like any other seq in Clojure, with -the difference that pairs can only have two slots. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them -seems out of the scope of this document.</p> -</div> <div class="paragraph"> -<p>However, if you have better examples to explain the state monad, documentation for another monad or -any other contribution is always welcome.</p> +<p>The <code>run-state</code> function returns an instance of Pair type. The Pair type acts like any other seq in +clojure with the exception that it only can contain two values.</p> </div> </div> <div class="sect2"> -<h3 id="_channel">5.5. Channel</h3> -<div class="paragraph"> -<p>In asynchronous environments with clojure and clojurescript we tend to use core.async, because it -is a very powerfull abstraction.</p> -</div> -<div class="paragraph"> -<p>It would be awesome to be able to work with channel as a monadic type, and combine it with error -monads for short-circuiting async computations that may fail.</p> -</div> +<h3 id="_reader">6.5. Reader</h3> <div class="paragraph"> -<p>Let’s start using channel as a functor:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cljs.core.async</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">chan</span> <span class="tok-nv">put!</span> <span class="tok-nv"><!!</span><span class="tok-p">]])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.channel</span> <span class="tok-ss">:as</span> <span class="tok-nv">channel</span><span class="tok-p">])</span> - -<span class="tok-c1">;; Declare arbitrary channel with initial value</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">mychan</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-mi">2</span><span class="tok-p">))</span> - -<span class="tok-c1">;; Use channel as a functor</span> -<span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-nv">mychan</span><span class="tok-p">))</span> -<span class="tok-c1">;; => 3</span></code></pre> +<p>TODO</p> </div> </div> +<div class="sect2"> +<h3 id="_writer">6.6. Writer</h3> <div class="paragraph"> -<p>The channel type also fulfills the monad abstraction, let see it in action:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">result</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-mi">2</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-mi">3</span><span class="tok-p">)]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> -<span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-nv">result</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 5</span></code></pre> +<p>TODO</p> </div> </div> +<div class="sect2"> +<h3 id="_continuation">6.7. Continuation</h3> <div class="paragraph"> -<p>But the best of all is coming: combine the channel monad with error monads. It allows to build very concise -and simple asynchronous APIs. Let see how you can use it your application:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:as</span> <span class="tok-nv">either</span><span class="tok-p">])</span> - -<span class="tok-c1">;; Declare a monad transformer</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">either-chan-m</span> - <span class="tok-p">(</span><span class="tok-nf">either/either-transformer</span> <span class="tok-nv">channel/channel-monad</span><span class="tok-p">))</span> - -<span class="tok-c1">;; A success example</span> -<span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">either-chan-m</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/right</span> <span class="tok-mi">2</span><span class="tok-p">))</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/right</span> <span class="tok-mi">3</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> -<span class="tok-c1">;; => #<Right [5]></span></code></pre> -</div> +<p>TODO</p> </div> -<div class="paragraph"> -<p>As you can see, the code looks very similar to the previos example, with the exception that -the value in a channel is not a simple plain value, is an either instance.</p> </div> +<div class="sect2"> +<h3 id="_lazy_sequences">6.8. Lazy sequences</h3> <div class="paragraph"> -<p>Let’s see what happens if some computation fails in the mlet composition:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">either-chan-m</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/left</span> <span class="tok-s">"Some error"</span><span class="tok-p">))</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">channel/with-value</span> <span class="tok-p">(</span><span class="tok-nf">either/right</span> <span class="tok-mi">3</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> -<span class="tok-c1">;; => #<Left [Some error]></span></code></pre> -</div> +<p>TODO</p> </div> -<div class="paragraph"> -<p>The result is the expected short-circuiting left, without unexpected nullpointer exceptions -or similar issues.</p> </div> +<div class="sect2"> +<h3 id="_vector">6.9. Vector</h3> <div class="paragraph"> -<p>With this compositional power, you can model your asynchronous API with a complete -error handling using any error monad (in this case Either).</p> +<p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_reader">5.6. Reader</h3> +<h3 id="_set">6.10. Set</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_writer">5.7. Writer</h3> +<h3 id="_map">6.11. Map</h3> <div class="paragraph"> <p>TODO</p> </div> </div> <div class="sect2"> -<h3 id="_continuation">5.8. Continuation</h3> +<h3 id="_validation">6.12. Validation</h3> <div class="paragraph"> -<p>TODO</p> +<p>The validation type is similar to Either or Exception types but it doesn’t implement a Monad instance. It +has two constructors: <code>ok</code> and <code>fail</code>, representing success and failure respectively.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;;=> #<Ok 42></span> + +<span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">[])</span> +<span class="tok-c1">;;=> #<Fail []></span></code></pre> </div> </div> -<div class="sect2"> -<h3 id="_vector">5.9. Vector</h3> <div class="paragraph"> -<p>TODO</p> +<p>It implements the Applicative protocol, and its intended usage is as an Applicative. Applying Validation +values together errs on the side of the failure, and applying failures together aggregates their values +using the Semigroup’s <code>mappend</code> function.</p> </div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-s">"OH NOES"</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Fail "OH NOES"></span> + +<span class="tok-c1">;; Note that `<*>` is a variadic fapply</span> +<span class="tok-p">(</span><span class="tok-nf">m/<*></span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:foo</span> <span class="tok-s">"bar"</span><span class="tok-p">})</span> + <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:baz</span> <span class="tok-s">"fubar"</span><span class="tok-p">})</span> + <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">99</span><span class="tok-p">))</span> +<span class="tok-c1">;;=> #<Fail {:baz "fubar", :foo "bar"}></span></code></pre> </div> </div> </div> -<div class="sect1"> -<h2 id="_faq">6. FAQ</h2> -<div class="sectionbody"> <div class="sect2"> -<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> +<h3 id="_complementary_libraries">6.13. Complementary libraries</h3> <div class="paragraph"> -<p>This is an incomplete list of differences with other existing libraries:</p> +<p>Some monads are defined as separated package for avoiding additional +and unnecesary dependencies to cats. Also, there are some libraries +that build higher-level abstractions on top of what cats offers.</p> </div> <div class="ulist"> <ul> <li> -<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling -is slighty limited (e.g. you always need to specify what monad you want use instead of -relying on the type). And obviously because it only has monads.</p> -</li> -<li> -<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big -difference with fluokitten is that <code>cats</code> doesn’t aim to extend every Clojure type -with monadic protocols, for the obvious reason that monad; functor and applicative represents -context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> +<p>Channel monad: <a href="https://github.com/funcool/cats-channel" class="bare">https://github.com/funcool/cats-channel</a></p> </li> <li> -<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation -has much unnecesary complexity.</p> +<p>Higher-level validation: <a href="https://github.com/funcool/vale" class="bare">https://github.com/funcool/vale</a></p> </li> </ul> </div> </div> +</div> +</div> +<div class="sect1"> +<h2 id="_faq">7. FAQ</h2> +<div class="sectionbody"> <div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</h3> +<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</h3> <div class="paragraph"> <p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types that don’t act like containers. For example, Clojure keywords are values but can not be containers so @@ -1504,16 +1489,20 @@ <h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions" </thead> <tbody> <tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">sequence</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> <td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">hash-map</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid</p></td> </tr> </tbody> </table> @@ -1521,10 +1510,10 @@ <h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions" </div> </div> <div class="sect1"> -<h2 id="_how_to_contribute">7. How to Contribute?</h2> +<h2 id="_how_to_contribute">8. How to Contribute?</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_philosophy">7.1. Philosophy</h3> +<h3 id="_philosophy">8.1. Philosophy</h3> <div class="paragraph"> <p>Five most important rules:</p> </div> @@ -1552,7 +1541,7 @@ <h3 id="_philosophy">7.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_procedure">7.2. Procedure</h3> +<h3 id="_procedure">8.2. Procedure</h3> <div class="paragraph"> <p><em>cats</em> does not have many restrictions for contributions. Just follow these steps depending on the situation:</p> @@ -1588,11 +1577,11 @@ <h3 id="_procedure">7.2. Procedure</h3> </div> </div> <div class="sect2"> -<h3 id="_license">7.3. License</h3> +<h3 id="_license">8.3. License</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> -Copyright (c) 2014-2015 Alejandro Gómez +Copyright (c) 2014-2015 Alejandro Gómez <alejandro@dialelo.com> All rights reserved. @@ -1624,7 +1613,7 @@ <h3 id="_license">7.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-03-22 10:06:52 CET +Last updated 2015-04-03 19:54:06 CEST </div> </div> </body> From 808aabb7c18bd569ea0eb012bf958f87cf72dd9a Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Mon, 13 Jul 2015 00:40:00 +0200 Subject: [PATCH 40/52] Generate documentation --- .gitignore | 10 - codox-dev/cats.builtin.html | 3 - codox-dev/cats.core.html | 140 -- codox-dev/cats.data.html | 4 - codox-dev/cats.monad.continuation.html | 6 - codox-dev/cats.monad.either.html | 8 - codox-dev/cats.monad.exception.html | 9 - codox-dev/cats.monad.html | 2 - codox-dev/cats.monad.identity.html | 5 - codox-dev/cats.monad.lazy.html | 3 - codox-dev/cats.monad.maybe.html | 12 - codox-dev/cats.monad.reader.html | 10 - codox-dev/cats.monad.state.html | 31 - codox-dev/cats.monad.writer.html | 3 - codox-dev/cats.protocols.html | 28 - codox-dev/css/default.css | 445 ----- codox-dev/index.html | 2 - codox-dev/js/jquery.min.js | 4 - codox-dev/js/page_effects.js | 99 -- codox/cats.builtin.html | 3 - codox/cats.core.html | 140 -- codox/cats.data.html | 4 - codox/cats.monad.continuation.html | 6 - codox/cats.monad.either.html | 8 - codox/cats.monad.exception.html | 14 - codox/cats.monad.html | 2 - codox/cats.monad.identity.html | 5 - codox/cats.monad.lazy.html | 3 - codox/cats.monad.maybe.html | 16 - codox/cats.monad.reader.html | 10 - codox/cats.monad.state.html | 31 - codox/cats.monad.writer.html | 3 - codox/cats.protocols.html | 28 - codox/css/default.css | 455 ------ codox/index.html | 2 - codox/js/jquery.min.js | 4 - codox/js/page_effects.js | 99 -- devel/api/cats.builtin.html | 2 - devel/api/cats.core.html | 71 - devel/api/cats.data.html | 2 - devel/api/cats.monad.channel.html | 2 - devel/api/cats.monad.continuation.html | 2 - devel/api/cats.monad.either.html | 2 - devel/api/cats.monad.exception.html | 2 - devel/api/cats.monad.html | 2 - devel/api/cats.monad.identity.html | 2 - devel/api/cats.monad.maybe.html | 11 - devel/api/cats.monad.reader.html | 2 - devel/api/cats.monad.state.html | 2 - devel/api/cats.monad.writer.html | 2 - devel/api/cats.protocols.html | 2 - devel/api/css/default.css | 442 ----- devel/api/index.html | 2 - devel/api/js/jquery.min.js | 4 - devel/api/js/page_effects.js | 99 -- devel/index.html | 1620 ------------------- devel/logo.png | Bin 5208 -> 0 bytes index.html | 1570 ------------------ latest/api/cats.applicative.validation.html | 2 + latest/api/cats.builtin.html | 2 +- latest/api/cats.core.html | 24 +- latest/api/cats.data.html | 2 +- latest/api/cats.monad.channel.html | 2 - latest/api/cats.monad.continuation.html | 2 +- latest/api/cats.monad.either.html | 4 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.html | 2 +- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 6 +- latest/api/cats.monad.reader.html | 2 +- latest/api/cats.monad.state.html | 2 +- latest/api/cats.monad.writer.html | 2 +- latest/api/cats.protocols.html | 2 +- latest/api/index.html | 2 +- latest/index.html | 1091 ++++++------- logo.png | Bin 5208 -> 0 bytes static/asciidoc.css | 529 ------ static/asciidoc.js | 189 --- static/logo/LICENSE.original.txt | 322 ---- static/logo/LICENSE.txt | 1 - static/logo/logo.png | Bin 5208 -> 0 bytes static/logo/logo.svg | 81 - static/logo/original.svg | 124 -- static/niwi.css | 607 ------- static/pygments.css | 205 --- 85 files changed, 502 insertions(+), 8207 deletions(-) delete mode 100644 .gitignore delete mode 100644 codox-dev/cats.builtin.html delete mode 100644 codox-dev/cats.core.html delete mode 100644 codox-dev/cats.data.html delete mode 100644 codox-dev/cats.monad.continuation.html delete mode 100644 codox-dev/cats.monad.either.html delete mode 100644 codox-dev/cats.monad.exception.html delete mode 100644 codox-dev/cats.monad.html delete mode 100644 codox-dev/cats.monad.identity.html delete mode 100644 codox-dev/cats.monad.lazy.html delete mode 100644 codox-dev/cats.monad.maybe.html delete mode 100644 codox-dev/cats.monad.reader.html delete mode 100644 codox-dev/cats.monad.state.html delete mode 100644 codox-dev/cats.monad.writer.html delete mode 100644 codox-dev/cats.protocols.html delete mode 100644 codox-dev/css/default.css delete mode 100644 codox-dev/index.html delete mode 100644 codox-dev/js/jquery.min.js delete mode 100644 codox-dev/js/page_effects.js delete mode 100644 codox/cats.builtin.html delete mode 100644 codox/cats.core.html delete mode 100644 codox/cats.data.html delete mode 100644 codox/cats.monad.continuation.html delete mode 100644 codox/cats.monad.either.html delete mode 100644 codox/cats.monad.exception.html delete mode 100644 codox/cats.monad.html delete mode 100644 codox/cats.monad.identity.html delete mode 100644 codox/cats.monad.lazy.html delete mode 100644 codox/cats.monad.maybe.html delete mode 100644 codox/cats.monad.reader.html delete mode 100644 codox/cats.monad.state.html delete mode 100644 codox/cats.monad.writer.html delete mode 100644 codox/cats.protocols.html delete mode 100644 codox/css/default.css delete mode 100644 codox/index.html delete mode 100644 codox/js/jquery.min.js delete mode 100644 codox/js/page_effects.js delete mode 100644 devel/api/cats.builtin.html delete mode 100644 devel/api/cats.core.html delete mode 100644 devel/api/cats.data.html delete mode 100644 devel/api/cats.monad.channel.html delete mode 100644 devel/api/cats.monad.continuation.html delete mode 100644 devel/api/cats.monad.either.html delete mode 100644 devel/api/cats.monad.exception.html delete mode 100644 devel/api/cats.monad.html delete mode 100644 devel/api/cats.monad.identity.html delete mode 100644 devel/api/cats.monad.maybe.html delete mode 100644 devel/api/cats.monad.reader.html delete mode 100644 devel/api/cats.monad.state.html delete mode 100644 devel/api/cats.monad.writer.html delete mode 100644 devel/api/cats.protocols.html delete mode 100644 devel/api/css/default.css delete mode 100644 devel/api/index.html delete mode 100644 devel/api/js/jquery.min.js delete mode 100644 devel/api/js/page_effects.js delete mode 100644 devel/index.html delete mode 100644 devel/logo.png delete mode 100644 index.html create mode 100644 latest/api/cats.applicative.validation.html delete mode 100644 latest/api/cats.monad.channel.html delete mode 100644 logo.png delete mode 100644 static/asciidoc.css delete mode 100644 static/asciidoc.js delete mode 100644 static/logo/LICENSE.original.txt delete mode 100644 static/logo/LICENSE.txt delete mode 100644 static/logo/logo.png delete mode 100644 static/logo/logo.svg delete mode 100644 static/logo/original.svg delete mode 100644 static/niwi.css delete mode 100644 static/pygments.css diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 1caa902..0000000 --- a/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/target -/classes -/checkouts -pom.xml -pom.xml.asc -*.jar -*.class -/.lein-* -/.nrepl-port -doc/index.html diff --git a/codox-dev/cats.builtin.html b/codox-dev/cats.builtin.html deleted file mode 100644 index 3b36057..0000000 --- a/codox-dev/cats.builtin.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. -</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.core.html b/codox-dev/cats.core.html deleted file mode 100644 index ba6703f..0000000 --- a/codox-dev/cats.core.html +++ /dev/null @@ -1,140 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. -</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. -</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. -Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the -arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, -ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. - -Example: - (>>= (just 1) (comp just inc) (comp just inc)) - ;=> #<Just [3]> -</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside -av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, -returning the identity element when the predicate yields false. - -Otherwise, returns the instance unchanged. - - (require '[cats.monad.moaybe :as maybe]) - (require '[cats.core :as m]) - - (m/filter (partial < 2) (maybe/just 3)) - ;=> <Just [3]> - - (m/filter (partial < 4) (maybe/just 3)) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. - -(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(m/forseq [2 3] maybe/just) -;=> <Just [[2 3]]> - -(m/forseq [1 2] - (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing)))) -;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value -of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a -monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (def monad+ (m/lift-m 2 +)) - - (monad+ (maybe/just 1) (maybe/just 2)) - ;=> <Just [3]> - - (monad+ (maybe/just 1) (maybe/nothing)) - ;=> <Nothing> - - (monad+ [0 2 4] [1 2]) - ;=> [1 2 3 4 5 6] -</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a -monadic context, map it into the given collection -calling sequence on the results. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/mapseq maybe/just [2 3]) - ;=> <Just [[2 3]]> - - (m/mapseq (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing))) - [1 2]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure -let. This allows much easy composition of monadic -computations. - -Let see one example for understand how it works, this is -a code using bind for compose few number of operations: - - - (bind (just 1) - (fn [a] - (bind (just (inc a)) - (fn [b] - (return (* b 2)))))) - ;=> #<Just [4]> - -Now see how this code can be more clear if you -are using mlet macro for do it: - - (mlet [a (just 1) - b (just (inc a))] - (return (* b 2))) - ;=> #<Just [4]> -</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the -same as mlet but specifying the monadic context. -So, instead of writing: - - (with-monad (maybe-transformer vector-monad) - (mlet [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2)))) - ;=> [#<Just [4]> #<Just [6]>] - -You can just write: - - (mlet-with (maybe-transformer vector-monad) - [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2))) - ;=> [#<Just [4]> #<Just [6]>] -</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in -default/effect free context. - -This is multiarity function that with arity pure/1 -it uses the dynamic scope to resolve the current -context. With pure/2, you can force a specific context -value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. -</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect -their values in a vector returned in the monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/sequence [(maybe/just 2) (maybe/just 3)]) - ;=> <Just [[2, 3]]> - - (m/sequence [(maybe/nothing) (maybe/just 3)]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.data.html b/codox-dev/cats.data.html deleted file mode 100644 index d0424d1..0000000 --- a/codox-dev/cats.data.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. -</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. -</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.continuation.html b/codox-dev/cats.monad.continuation.html deleted file mode 100644 index 4f0ecdc..0000000 --- a/codox-dev/cats.monad.continuation.html +++ /dev/null @@ -1,6 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. -</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. -</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.either.html b/codox-dev/cats.monad.either.html deleted file mode 100644 index 61e3507..0000000 --- a/codox-dev/cats.monad.either.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. -</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. -</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. -</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.exception.html b/codox-dev/cats.monad.exception.html deleted file mode 100644 index 152d401..0000000 --- a/codox-dev/cats.monad.exception.html +++ /dev/null @@ -1,9 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. - -The Try type represents a computation that may either result in an exception, -or return a successfully computed value. It's similar to, but semantically -different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. -</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. -</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. -</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.html b/codox-dev/cats.monad.html deleted file mode 100644 index 0216531..0000000 --- a/codox-dev/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.identity.html b/codox-dev/cats.monad.identity.html deleted file mode 100644 index a465d9b..0000000 --- a/codox-dev/cats.monad.identity.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. -</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. -</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. -</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.lazy.html b/codox-dev/cats.monad.lazy.html deleted file mode 100644 index d6c3bb6..0000000 --- a/codox-dev/cats.monad.lazy.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. -</pre></div><div class="public anchor" id="var-lazy-monad"><h3>lazy-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lazy-transformer"><h3>lazy-transformer</h3><div class="usage"><code>(lazy-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.maybe.html b/codox-dev/cats.monad.maybe.html deleted file mode 100644 index c281b39..0000000 --- a/codox-dev/cats.monad.maybe.html +++ /dev/null @@ -1,12 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. -</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. -</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. - -Examples: - (from-maybe (just 1)) - ;=> 1 - (from-maybe (nothing)) - ;=> nil -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.reader.html b/codox-dev/cats.monad.reader.html deleted file mode 100644 index de89766..0000000 --- a/codox-dev/cats.monad.reader.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. -</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. -</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function -to Reader class instance. -Reader class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the -wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.state.html b/codox-dev/cats.monad.state.html deleted file mode 100644 index 8b193dc..0000000 --- a/codox-dev/cats.monad.state.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. -</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. -</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -value, ignoring the state. -Equivalent to taking the first value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -state. -Equivalent to taking the second value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces -the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and returns a cats.data.Pair -instance with result and new state. - - (def computation (mlet [x (get-state) - y (put-state (inc x))] - (return y))) - - (def initial-state 1) - (run-state computation initial-state) - -This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function -to State class instance. -State class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the -specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.monad.writer.html b/codox-dev/cats.monad.writer.html deleted file mode 100644 index 8be27fe..0000000 --- a/codox-dev/cats.monad.writer.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. -</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/cats.protocols.html b/codox-dev/cats.protocols.html deleted file mode 100644 index 34fb37b..0000000 --- a/codox-dev/cats.protocols.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. -</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) -inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. -</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. -</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. -</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state -and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. -</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. -</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. -</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. -</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, -yield a writer which has the first element of the pair as the value and -the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. -</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/css/default.css b/codox-dev/css/default.css deleted file mode 100644 index 81cb803..0000000 --- a/codox-dev/css/default.css +++ /dev/null @@ -1,445 +0,0 @@ -body { - font-family: Helvetica, Arial, sans-serif; - font-size: 15px; -} - -pre, code { - font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; - font-size: 9pt; - margin: 15px 0; -} - -h2 { - font-weight: normal; - font-size: 28px; - padding: 10px 0 2px 0; - margin: 0; -} - -#header, #content, .sidebar { - position: fixed; -} - -#header { - top: 0; - left: 0; - right: 0; - height: 20px; - background: #444; - color: #fff; - padding: 5px 7px; -} - -#content { - top: 30px; - right: 0; - bottom: 0; - overflow: auto; - background: #fff; - color: #333; - padding: 0 18px; -} - -.sidebar { - position: fixed; - top: 30px; - bottom: 0; - overflow: auto; -} - -#namespaces { - background: #e2e2e2; - border-right: solid 1px #cccccc; - left: 0; - width: 250px; -} - -#vars { - background: #f2f2f2; - border-right: solid 1px #cccccc; - left: 251px; - width: 200px; -} - -.namespace-index { - left: 251px; -} - -.namespace-docs { - left: 452px; -} - -#header { - background: -moz-linear-gradient(top, #555 0%, #222 100%); - background: -webkit-linear-gradient(top, #555 0%, #333 100%); - background: -o-linear-gradient(top, #555 0%, #222 100%); - background: -ms-linear-gradient(top, #555 0%, #222 100%); - background: linear-gradient(top, #555 0%, #222 100%); - box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); - z-index: 100; -} - -#header h1 { - margin: 0; - padding: 0; - font-size: 12pt; - font-weight: lighter; - text-shadow: -1px -1px 0px #333; -} - -#header a, .sidebar a { - display: block; - text-decoration: none; -} - -#header a { - color: #fff; -} - -.sidebar a { - color: #333; -} - -#header h2 { - float: right; - font-size: 9pt; - font-weight: normal; - margin: 3px 3px; - padding: 0; - color: #bbb; -} - -#header h2 a { - display: inline; -} - -.sidebar h3 { - margin: 0; - padding: 10px 10px 0 10px; - font-size: 19px; - font-weight: normal; -} - -.sidebar ul { - padding: 0.5em 0em; - margin: 0; -} - -.sidebar li { - display: block; - vertical-align: middle; -} - -.sidebar li a, .sidebar li .no-link { - border-left: 3px solid transparent; - padding: 0 7px; - white-space: nowrap; -} - -.sidebar li .no-link { - display: block; - color: #777; - font-style: italic; -} - -.sidebar li .inner { - display: inline-block; - padding-top: 7px; - height: 24px; -} - -.sidebar li a, .sidebar li .tree { - height: 31px; -} - -.depth-1 .inner { padding-left: 2px; } -.depth-2 .inner { padding-left: 6px; } -.depth-3 .inner { padding-left: 20px; } -.depth-4 .inner { padding-left: 34px; } -.depth-5 .inner { padding-left: 48px; } -.depth-6 .inner { padding-left: 62px; } - -.sidebar li .tree { - display: block; - float: left; - position: relative; - top: -10px; - margin: 0 4px 0 0; - padding: 0; -} - -.sidebar li.depth-1 .tree { - display: none; -} - -.sidebar li .tree .top, .sidebar li .tree .bottom { - display: block; - margin: 0; - padding: 0; - width: 7px; -} - -.sidebar li .tree .top { - border-left: 1px solid #aaa; - border-bottom: 1px solid #aaa; - height: 19px; -} - -.sidebar li .tree .bottom { - height: 22px; -} - -.sidebar li.branch .tree .bottom { - border-left: 1px solid #aaa; -} - -#namespaces li.current a { - border-left: 3px solid #a33; - color: #a33; -} - -#vars li.current a { - border-left: 3px solid #33a; - color: #33a; -} - -#content h3 { - font-size: 13pt; - font-weight: bold; -} - -.public h3 { - margin: 0; - float: left; -} - -.usage { - clear: both; -} - -.public { - padding-top: 12px; - margin-top: 15px; - margin-bottom: 28px; -} - -.public:last-child { - margin-bottom: 20%; -} - -.members .public:last-child { - margin-bottom: 0; -} - -.members { - margin: 15px 0; -} - -.members h4 { - color: #555; - font-weight: normal; - font-variant: small-caps; - margin: 0 0 5px 0; -} - -.members .inner { - padding-top: 5px; - padding-left: 15px; - margin-top: 2px; - margin-left: 4px; - border-left: 1px solid #bbb; -} - -#content .members .inner h3 { - font-size: 12pt; -} - -.members .public { - margin-top: 0; - margin-bottom: 1em; - padding-top: 6px; -} - -.members .public:first-child { - padding-top: 0; -} - -.public h4.type, -.public h4.dynamic, -.public h4.added, -.public h4.deprecated { - margin: 0; - float: left; - font-variant: small-caps; - font-size: 13px; - font-weight: bold; - margin-top: 3px; - margin-left: 10px; -} - -.members h4.type, -.members h4.added, -.members h4.deprecated { - margin-top: 1px; -} - -h4.type { - color: #717171; -} - -h4.dynamic { - color: #9933aa; -} - -h4.added { - color: #508820; -} - -h4.deprecated { - color: #880000; -} - -.namespace { - margin-bottom: 30px; -} - -.namespace:last-child { - margin-bottom: 10%; -} - -.index { - padding: 0; - font-size: 80%; - margin: 15px 0; - line-height: 16px; -} - -.index * { - display: inline; -} - -.index p { - padding-right: 3px; -} - -.index li { - padding-right: 5px; -} - -.index ul { - padding-left: 0; -} - -.usage code { - display: block; - color: #008; - margin: 2px 0; -} - -.usage code:first-child { - padding-top: 10px; -} - -p { - margin: 15px 0; -} - -.public p:first-child, .public pre.plaintext { - margin-top: 12px; -} - -.doc { - margin: 0; -} - -.namespace-index .doc { - margin-bottom: 20px; -} - -.namespace-index .namespace .doc { - margin-bottom: 10px; -} - -.markdown { - line-height: 18px; - font-size: 14px; -} - -.markdown, .namespace .index { - max-width: 680px; - overflow-x: visible; -} - -.namespace-docs .markdown { - padding-bottom: 15px; -} - -.markdown p:last-child { - margin-bottom: 0; -} - -.markdown code, .src-link a { - background: #f6f6f6; - border: 1px solid #e4e4e4; - border-radius: 2px; -} - -.markdown pre { - background: #f4f4f4; - border: 1px solid #e0e0e0; - border-radius: 2px; - padding: 5px 10px; - margin: 0 10px; -} - -.markdown pre code { - background: transparent; - border: none; -} - -.doc ul, .doc ol { - padding-left: 30px; -} - -.doc table { - border-collapse: collapse; - margin: 0 10px; -} - -.doc table td, .doc table th { - border: 1px solid #dddddd; - padding: 4px 6px; -} - -.doc table th { - background: #f2f2f2; -} - -.doc dl { - margin: 0 10px 20px 10px; -} - -.doc dl dt { - font-weight: bold; - margin: 0; - padding: 3px 0; - border-bottom: 1px solid #ddd; -} - -.doc dl dd { - padding: 5px 0; - margin: 0 0 5px 10px; -} - -.doc abbr { - border-bottom: 1px dotted #333; - font-variant: none - cursor: help; -} - -.src-link a { - font-size: 70%; - padding: 1px 4px; - text-decoration: none; - color: #5555bb; -} \ No newline at end of file diff --git a/codox-dev/index.html b/codox-dev/index.html deleted file mode 100644 index f003593..0000000 --- a/codox-dev/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.2.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="namespace-index" id="content"><h2>Cats 0.2.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context-or">get-current-context-or</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var--.3EPair">->Pair</a> </li><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><pre class="plaintext"></pre></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><pre class="plaintext">The Continuation Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var--.3EContinuation">->Continuation</a> </li><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><pre class="plaintext">The Either (Error) Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var--.3ELeft">->Left</a> </li><li> <a href="cats.monad.either.html#var--.3ERight">->Right</a> </li><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><pre class="plaintext">The Try Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var--.3EFailure">->Failure</a> </li><li> <a href="cats.monad.exception.html#var--.3ESuccess">->Success</a> </li><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><pre class="plaintext">The Identity Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var--.3EIdentity">->Identity</a> </li><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.lazy.html">cats.monad.lazy</a></h3><div class="doc"><pre class="plaintext">The Lazy Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.lazy.html#var-lazy-monad">lazy-monad</a> </li><li> <a href="cats.monad.lazy.html#var-lazy-transformer">lazy-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><pre class="plaintext">The Maybe Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var--.3EJust">->Just</a> </li><li> <a href="cats.monad.maybe.html#var--.3ENothing">->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><pre class="plaintext">The Reader Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var--.3EReader">->Reader</a> </li><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><pre class="plaintext">The State Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var--.3EState">->State</a> </li><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><pre class="plaintext">The Writer Monad.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><pre class="plaintext">Cathegory theory types definition.</pre></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></div></body></html> \ No newline at end of file diff --git a/codox-dev/js/jquery.min.js b/codox-dev/js/jquery.min.js deleted file mode 100644 index 73f33fb..0000000 --- a/codox-dev/js/jquery.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) -},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/codox-dev/js/page_effects.js b/codox-dev/js/page_effects.js deleted file mode 100644 index ef8120d..0000000 --- a/codox-dev/js/page_effects.js +++ /dev/null @@ -1,99 +0,0 @@ -function visibleInParent(element) { - var position = $(element).position().top - return position > -50 && position < ($(element).offsetParent().height() - 50) -} - -function hasFragment(link, fragment) { - return $(link).attr("href").indexOf("#" + fragment) != -1 -} - -function findLinkByFragment(elements, fragment) { - return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() -} - -function scrollToCurrentVarLink(elements) { - var elements = $(elements); - var parent = elements.offsetParent(); - - if (elements.length == 0) return; - - var top = elements.first().position().top; - var bottom = elements.last().position().top + elements.last().height(); - - if (top >= 0 && bottom <= parent.height()) return; - - if (top < 0) { - parent.scrollTop(parent.scrollTop() + top); - } - else if (bottom > parent.height()) { - parent.scrollTop(parent.scrollTop() + bottom - parent.height()); - } -} - -function setCurrentVarLink() { - $('#vars a').parent().removeClass('current') - $('.anchor'). - filter(function(index) { return visibleInParent(this) }). - each(function(index, element) { - findLinkByFragment("#vars a", element.id). - parent(). - addClass('current') - }); - scrollToCurrentVarLink('#vars .current'); -} - -var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) - -function scrollPositionId(element) { - var directory = window.location.href.replace(/[^\/]+\.html$/, '') - return 'scroll::' + $(element).attr('id') + '::' + directory -} - -function storeScrollPosition(element) { - if (!hasStorage) return; - localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) - localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) -} - -function recallScrollPosition(element) { - if (!hasStorage) return; - $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) - $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) -} - -function persistScrollPosition(element) { - recallScrollPosition(element) - $(element).scroll(function() { storeScrollPosition(element) }) -} - -function sidebarContentWidth(element) { - var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) - return Math.max.apply(Math, widths) -} - -function resizeSidebars() { - var nsWidth = sidebarContentWidth('#namespaces') + 30 - var varWidth = 0 - - if ($('#vars').length != 0) { - varWidth = sidebarContentWidth('#vars') + 30 - } - - // snap to grid - var snap = 30; - nsWidth = Math.ceil(nsWidth / snap) * snap; - varWidth = Math.ceil(varWidth / snap) * snap; - - $('#namespaces').css('width', nsWidth) - $('#vars').css('width', varWidth) - $('#vars, .namespace-index').css('left', nsWidth + 1) - $('.namespace-docs').css('left', nsWidth + varWidth + 2) -} - -$(window).ready(resizeSidebars) -$(window).ready(setCurrentVarLink) -$(window).ready(function() { persistScrollPosition('#namespaces')}) -$(window).ready(function() { - $('#content').scroll(setCurrentVarLink) - $(window).resize(setCurrentVarLink) -}) diff --git a/codox/cats.builtin.html b/codox/cats.builtin.html deleted file mode 100644 index ab4b89c..0000000 --- a/codox/cats.builtin.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.builtin documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.builtin.html#var-sequence-monad"><div class="inner"><span>sequence-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-set-monad"><div class="inner"><span>set-monad</span></div></a></li><li class="depth-1"><a href="cats.builtin.html#var-vector-monad"><div class="inner"><span>vector-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><pre class="plaintext">Clojure(Script) built-in types extensions. -</pre></div><div class="public anchor" id="var-sequence-monad"><h3>sequence-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-set-monad"><h3>set-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-vector-monad"><h3>vector-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.core.html b/codox/cats.core.html deleted file mode 100644 index baacdf6..0000000 --- a/codox/cats.core.html +++ /dev/null @@ -1,140 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.core documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.core.html#var-*context*"><div class="inner"><span>*context*</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.24.3E"><div class="inner"><span><$></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C*.3E"><div class="inner"><span><*></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3C.3D.3C"><div class="inner"><span><=<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3D.3C.3C"><div class="inner"><span>=<<</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3D.3E"><div class="inner"><span>>=></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E"><div class="inner"><span>>></span></div></a></li><li class="depth-1"><a href="cats.core.html#var-.3E.3E.3D"><div class="inner"><span>>>=</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-errlet"><div class="inner"><span>errlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fapply"><div class="inner"><span>fapply</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-filter"><div class="inner"><span>filter</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-fmap"><div class="inner"><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-forseq"><div class="inner"><span>forseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-get-current-context-or"><div class="inner"><span>get-current-context-or</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-guard"><div class="inner"><span>guard</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-join"><div class="inner"><span>join</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift"><div class="inner"><span>lift</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-lift-m"><div class="inner"><span>lift-m</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mapseq"><div class="inner"><span>mapseq</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet"><div class="inner"><span>mlet</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mlet-with"><div class="inner"><span>mlet-with</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mplus"><div class="inner"><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-mzero"><div class="inner"><span>mzero</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-pure"><div class="inner"><span>pure</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-return"><div class="inner"><span>return</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-sequence"><div class="inner"><span>sequence</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-unless"><div class="inner"><span>unless</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-when"><div class="inner"><span>when</span></div></a></li><li class="depth-1"><a href="cats.core.html#var-with-monad"><div class="inner"><span>with-monad</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><pre class="plaintext">Category Theory abstractions for Clojure -</pre></div><div class="public anchor" id="var-*context*"><h3>*context*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><$></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><pre class="plaintext">Alias of fmap. -</pre></div></div><div class="public anchor" id="var-.3C*.3E"><h3><*></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative fapply. -</pre></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><=<</h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><pre class="plaintext">Right-to-left composition of monads. -Same as `>=>` with its first two arguments flipped.</pre></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3>=<<</h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><pre class="plaintext">Same as the two argument version of `>>=` but with the -arguments interchanged.</pre></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3>>=></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><pre class="plaintext">Left-to-right composition of monads. -</pre></div></div><div class="public anchor" id="var-.3E.3E"><h3>>></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind, -ignoring the values produced by the monad computations.</pre></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3>>>=</h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><pre class="plaintext">Performs a Haskell-style left-associative bind. - -Example: - (>>= (just 1) (comp just inc) (comp just inc)) - ;=> #<Just [3]> -</pre></div></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><pre class="plaintext">Given a value inside monadic context mv and any function, -applies a function to value of mv.</pre></div></div><div class="public anchor" id="var-errlet"><h3>errlet</h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><pre class="plaintext">Given function inside af's conext and value inside -av's context, applies the function to value and return -a result wrapped in context of same type of av context.</pre></div></div><div class="public anchor" id="var-filter"><h3>filter</h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><pre class="plaintext">Applies a predicate to a value in a `MonadZero` instance, -returning the identity element when the predicate yields false. - -Otherwise, returns the instance unchanged. - - (require '[cats.monad.moaybe :as maybe]) - (require '[cats.core :as m]) - - (m/filter (partial < 2) (maybe/just 3)) - ;=> <Just [3]> - - (m/filter (partial < 4) (maybe/just 3)) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><pre class="plaintext">Apply a function f to the value inside functor's fv -preserving the context type.</pre></div></div><div class="public anchor" id="var-forseq"><h3>forseq</h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><pre class="plaintext">Same as mapseq but with the arguments in reverse order. - -(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(m/forseq [2 3] maybe/just) -;=> <Just [[2 3]]> - -(m/forseq [1 2] - (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing)))) -;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-get-current-context-or"><h3>get-current-context-or</h3><div class="usage"><code>(get-current-context-or default)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-guard"><h3>guard</h3><div class="usage"><code>(guard b)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-join"><h3>join</h3><div class="usage"><code>(join mv)</code></div><div class="doc"><pre class="plaintext">Remove one level of monadic structure. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the inner monad of a monad transformer into a value -of the monad transformer.</pre></div></div><div class="public anchor" id="var-lift-m"><h3>lift-m</h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><pre class="plaintext">Lifts a function with the given fixed number of arguments to a -monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (def monad+ (m/lift-m 2 +)) - - (monad+ (maybe/just 1) (maybe/just 2)) - ;=> <Just [3]> - - (monad+ (maybe/just 1) (maybe/nothing)) - ;=> <Nothing> - - (monad+ [0 2 4] [1 2]) - ;=> [1 2 3 4 5 6] -</pre></div></div><div class="public anchor" id="var-mapseq"><h3>mapseq</h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><pre class="plaintext">Given a function that takes a value and puts it into a -monadic context, map it into the given collection -calling sequence on the results. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/mapseq maybe/just [2 3]) - ;=> <Just [[2 3]]> - - (m/mapseq (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing))) - [1 2]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-mlet"><h3>mlet</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><pre class="plaintext">Monad composition macro that works like clojure -let. This allows much easy composition of monadic -computations. - -Let see one example for understand how it works, this is -a code using bind for compose few number of operations: - - - (bind (just 1) - (fn [a] - (bind (just (inc a)) - (fn [b] - (return (* b 2)))))) - ;=> #<Just [4]> - -Now see how this code can be more clear if you -are using mlet macro for do it: - - (mlet [a (just 1) - b (just (inc a))] - (return (* b 2))) - ;=> #<Just [4]> -</pre></div></div><div class="public anchor" id="var-mlet-with"><h3>mlet-with</h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><pre class="plaintext">A helper macro for using monad transformers, is the -same as mlet but specifying the monadic context. -So, instead of writing: - - (with-monad (maybe-transformer vector-monad) - (mlet [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2)))) - ;=> [#<Just [4]> #<Just [6]>] - -You can just write: - - (mlet-with (maybe-transformer vector-monad) - [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2))) - ;=> [#<Just [4]> #<Just [6]>] -</pre></div></div><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure v)</code><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Given any value v, return it wrapped in -default/effect free context. - -This is multiarity function that with arity pure/1 -it uses the dynamic scope to resolve the current -context. With pure/2, you can force a specific context -value.</pre></div></div><div class="public anchor" id="var-return"><h3>return</h3><div class="usage"><code>(return v)</code><code>(return m v)</code></div><div class="doc"><pre class="plaintext">This is a monad version of pure. -</pre></div></div><div class="public anchor" id="var-sequence"><h3>sequence</h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><pre class="plaintext">Given a non-empty collection of monadic values, collect -their values in a vector returned in the monadic context. - - (require '[cats.monad.maybe :as maybe]) - (require '[cats.core :as m]) - - (m/sequence [(maybe/just 2) (maybe/just 3)]) - ;=> <Just [[2, 3]]> - - (m/sequence [(maybe/nothing) (maybe/just 3)]) - ;=> <Nothing> -</pre></div></div><div class="public anchor" id="var-unless"><h3>unless</h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is false, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-when"><h3>when</h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><pre class="plaintext">If the expression is true, returns the monadic value. - -Otherwise, yields nil in a monadic context.</pre></div></div><div class="public anchor" id="var-with-monad"><h3>with-monad</h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.data.html b/codox/cats.data.html deleted file mode 100644 index e3bef65..0000000 --- a/codox/cats.data.html +++ /dev/null @@ -1,4 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.data documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.data.html#var--.3EPair"><div class="inner"><span>->Pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair"><div class="inner"><span>pair</span></div></a></li><li class="depth-1"><a href="cats.data.html#var-pair.3F"><div class="inner"><span>pair?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><pre class="plaintext">Data structures that are used in various places of the library. -</pre></div><div class="public anchor" id="var--.3EPair"><h3>->Pair</h3><div class="usage"><code>(->Pair fst snd)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.data.Pair. -</pre></div></div><div class="public anchor" id="var-pair"><h3>pair</h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pair.3F"><h3>pair?</h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.continuation.html b/codox/cats.monad.continuation.html deleted file mode 100644 index 8c256ed..0000000 --- a/codox/cats.monad.continuation.html +++ /dev/null @@ -1,6 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.continuation documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.continuation.html#var--.3EContinuation"><div class="inner"><span>->Continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-call-cc"><div class="inner"><span>call-cc</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation"><div class="inner"><span>continuation</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-continuation-monad"><div class="inner"><span>continuation-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.continuation.html#var-run-cont"><div class="inner"><span>run-cont</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><pre class="plaintext">The Continuation Monad. -</pre></div><div class="public anchor" id="var--.3EContinuation"><h3>->Continuation</h3><div class="usage"><code>(->Continuation mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.continuation.Continuation. -</pre></div></div><div class="public anchor" id="var-call-cc"><h3>call-cc</h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-continuation"><h3>continuation</h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><pre class="plaintext">Default constructor for continuation. -</pre></div></div><div class="public anchor" id="var-continuation-monad"><h3>continuation-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-run-cont"><h3>run-cont</h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><pre class="plaintext">Given a Continuation instance, execute the -wrapped computation and return its value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.either.html b/codox/cats.monad.either.html deleted file mode 100644 index 6d0e383..0000000 --- a/codox/cats.monad.either.html +++ /dev/null @@ -1,8 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.either documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.either.html#var--.3ELeft"><div class="inner"><span>->Left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var--.3ERight"><div class="inner"><span>->Right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-monad"><div class="inner"><span>either-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either-transformer"><div class="inner"><span>either-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-either.3F"><div class="inner"><span>either?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-from-either"><div class="inner"><span>from-either</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left"><div class="inner"><span>left</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-left.3F"><div class="inner"><span>left?</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right"><div class="inner"><span>right</span></div></a></li><li class="depth-1"><a href="cats.monad.either.html#var-right.3F"><div class="inner"><span>right?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><pre class="plaintext">The Either (Error) Monad. -</pre></div><div class="public anchor" id="var--.3ELeft"><h3>->Left</h3><div class="usage"><code>(->Left v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Left. -</pre></div></div><div class="public anchor" id="var--.3ERight"><h3>->Right</h3><div class="usage"><code>(->Right v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.either.Right. -</pre></div></div><div class="public anchor" id="var-either-monad"><h3>either-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either-transformer"><h3>either-transformer</h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-either.3F"><h3>either?</h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-either"><h3>from-either</h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><pre class="plaintext">Return inner value of either monad. -</pre></div></div><div class="public anchor" id="var-left"><h3>left</h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><pre class="plaintext">Left constructor for Either type. -</pre></div></div><div class="public anchor" id="var-left.3F"><h3>left?</h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-right"><h3>right</h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><pre class="plaintext">Right constructor for Either type. -</pre></div></div><div class="public anchor" id="var-right.3F"><h3>right?</h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.exception.html b/codox/cats.monad.exception.html deleted file mode 100644 index 3827a77..0000000 --- a/codox/cats.monad.exception.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.exception documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.exception.html#var--.3EFailure"><div class="inner"><span>->Failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var--.3ESuccess"><div class="inner"><span>->Success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exception-monad"><div class="inner"><span>exception-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-on"><div class="inner"><span>exec-try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-else"><div class="inner"><span>exec-try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-exec-try-or-recover"><div class="inner"><span>exec-try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure"><div class="inner"><span>failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-failure.3F"><div class="inner"><span>failure?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-failure"><div class="inner"><span>from-failure</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-success"><div class="inner"><span>from-success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-from-try"><div class="inner"><span>from-try</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success"><div class="inner"><span>success</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-success.3F"><div class="inner"><span>success?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-on"><div class="inner"><span>try-on</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-else"><div class="inner"><span>try-or-else</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try-or-recover"><div class="inner"><span>try-or-recover</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-try.3F"><div class="inner"><span>try?</span></div></a></li><li class="depth-1"><a href="cats.monad.exception.html#var-wrap"><div class="inner"><span>wrap</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><pre class="plaintext">The Try Monad. - -The Try type represents a computation that may either result in an exception, -or return a successfully computed value. It's similar to, but semantically -different from the Either type.</pre></div><div class="public anchor" id="var--.3EFailure"><h3>->Failure</h3><div class="usage"><code>(->Failure e)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Failure. -</pre></div></div><div class="public anchor" id="var--.3ESuccess"><h3>->Success</h3><div class="usage"><code>(->Success v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.exception.Success. -</pre></div></div><div class="public anchor" id="var-exception-monad"><h3>exception-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-on"><h3>exec-try-on</h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-else"><h3>exec-try-or-else</h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3>exec-try-or-recover</h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure"><h3>failure</h3><div class="usage"><code>(failure e)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-failure.3F"><h3>failure?</h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-failure"><h3>from-failure</h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-success"><h3>from-success</h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-from-try"><h3>from-try</h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success"><h3>success</h3><div class="usage"><code>(success v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-success.3F"><h3>success?</h3><div class="usage"><code>(success? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-on"><h3>try-on</h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><pre class="plaintext">Wraps a computation and return success of failure. -</pre></div></div><div class="public anchor" id="var-try-or-else"><h3>try-or-else</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try-or-recover"><h3>try-or-recover</h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-try.3F"><h3>try?</h3><div class="usage"><code>(try? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-wrap"><h3>wrap</h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><pre class="plaintext">Wrap a function in a try monad. - -Is a high order function that accept a function -as parameter and returns an other that returns -success or failure depending of result of the -first function.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.html b/codox/cats.monad.html deleted file mode 100644 index 764a00f..0000000 --- a/codox/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><pre class="plaintext"></pre></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.identity.html b/codox/cats.monad.identity.html deleted file mode 100644 index 7e4ab49..0000000 --- a/codox/cats.monad.identity.html +++ /dev/null @@ -1,5 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.identity documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.identity.html#var--.3EIdentity"><div class="inner"><span>->Identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity"><div class="inner"><span>identity</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-monad"><div class="inner"><span>identity-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.identity.html#var-identity-transformer"><div class="inner"><span>identity-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><pre class="plaintext">The Identity Monad. -</pre></div><div class="public anchor" id="var--.3EIdentity"><h3>->Identity</h3><div class="usage"><code>(->Identity v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.identity.Identity. -</pre></div></div><div class="public anchor" id="var-identity"><h3>identity</h3><div class="usage"><code>(identity v)</code></div><div class="doc"><pre class="plaintext">Default constructor for identity type. -</pre></div></div><div class="public anchor" id="var-identity-monad"><h3>identity-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-identity-transformer"><h3>identity-transformer</h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.lazy.html b/codox/cats.monad.lazy.html deleted file mode 100644 index b16e01b..0000000 --- a/codox/cats.monad.lazy.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.lazy documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-monad"><div class="inner"><span>lazy-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.lazy.html#var-lazy-transformer"><div class="inner"><span>lazy-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.lazy</h2><div class="doc"><pre class="plaintext">The Lazy Monad. -</pre></div><div class="public anchor" id="var-lazy-monad"><h3>lazy-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-lazy-transformer"><h3>lazy-transformer</h3><div class="usage"><code>(lazy-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.maybe.html b/codox/cats.monad.maybe.html deleted file mode 100644 index 4493acc..0000000 --- a/codox/cats.monad.maybe.html +++ /dev/null @@ -1,16 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.maybe documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.maybe.html#var--.3EJust"><div class="inner"><span>->Just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var--.3ENothing"><div class="inner"><span>->Nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-from-maybe"><div class="inner"><span>from-maybe</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just"><div class="inner"><span>just</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-just.3F"><div class="inner"><span>just?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-monad"><div class="inner"><span>maybe-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe-transformer"><div class="inner"><span>maybe-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-maybe.3F"><div class="inner"><span>maybe?</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing"><div class="inner"><span>nothing</span></div></a></li><li class="depth-1"><a href="cats.monad.maybe.html#var-nothing.3F"><div class="inner"><span>nothing?</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><pre class="plaintext">The Maybe Monad. -</pre></div><div class="public anchor" id="var--.3EJust"><h3>->Just</h3><div class="usage"><code>(->Just v)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Just. -</pre></div></div><div class="public anchor" id="var--.3ENothing"><h3>->Nothing</h3><div class="usage"><code>(->Nothing)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.maybe.Nothing. -</pre></div></div><div class="public anchor" id="var-from-maybe"><h3>from-maybe</h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><pre class="plaintext">Return inner value from maybe monad. Accepts an optional default value. - -Examples: - (from-maybe (just 1)) - ;=> 1 - (from-maybe (just 1) 42) - ;=> 1 - (from-maybe (nothing)) - ;=> nil - (from-maybe (nothing) 42) - ;=> 42 -</pre></div></div><div class="public anchor" id="var-just"><h3>just</h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-just.3F"><h3>just?</h3><div class="usage"><code>(just? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-monad"><h3>maybe-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe-transformer"><h3>maybe-transformer</h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-maybe.3F"><h3>maybe?</h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing"><h3>nothing</h3><div class="usage"><code>(nothing)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-nothing.3F"><h3>nothing?</h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.reader.html b/codox/cats.monad.reader.html deleted file mode 100644 index 66f6e31..0000000 --- a/codox/cats.monad.reader.html +++ /dev/null @@ -1,10 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.reader documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.reader.html#var--.3EReader"><div class="inner"><span>->Reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-ask"><div class="inner"><span>ask</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-local"><div class="inner"><span>local</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader"><div class="inner"><span>reader</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-monad"><div class="inner"><span>reader-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader-transformer"><div class="inner"><span>reader-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-reader.3F"><div class="inner"><span>reader?</span></div></a></li><li class="depth-1"><a href="cats.monad.reader.html#var-run-reader"><div class="inner"><span>run-reader</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><pre class="plaintext">The Reader Monad. -</pre></div><div class="public anchor" id="var--.3EReader"><h3>->Reader</h3><div class="usage"><code>(->Reader mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.reader.Reader. -</pre></div></div><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader"><h3>reader</h3><div class="usage"><code>(reader f)</code></div><div class="doc"><pre class="plaintext">Transform a simple reader-monad function -to Reader class instance. -Reader class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-reader-monad"><h3>reader-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader-transformer"><h3>reader-transformer</h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-reader.3F"><h3>reader?</h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -Reader type.</pre></div></div><div class="public anchor" id="var-run-reader"><h3>run-reader</h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><pre class="plaintext">Given a Reader instance, execute the -wrapped computation and returns a value.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.state.html b/codox/cats.monad.state.html deleted file mode 100644 index 56709bc..0000000 --- a/codox/cats.monad.state.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.state documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.state.html#var--.3EState"><div class="inner"><span>->State</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-eval-state"><div class="inner"><span>eval-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-exec-state"><div class="inner"><span>exec-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-get-state"><div class="inner"><span>get-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-put-state"><div class="inner"><span>put-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-run-state"><div class="inner"><span>run-state</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-monad"><div class="inner"><span>state-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-t"><div class="inner"><span>state-t</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state-transformer"><div class="inner"><span>state-transformer</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-state.3F"><div class="inner"><span>state?</span></div></a></li><li class="depth-1"><a href="cats.monad.state.html#var-swap-state"><div class="inner"><span>swap-state</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><pre class="plaintext">The State Monad. -</pre></div><div class="public anchor" id="var--.3EState"><h3>->State</h3><div class="usage"><code>(->State mfn)</code></div><div class="doc"><pre class="plaintext">Positional factory function for class cats.monad.state.State. -</pre></div></div><div class="public anchor" id="var-eval-state"><h3>eval-state</h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -value, ignoring the state. -Equivalent to taking the first value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-exec-state"><h3>exec-state</h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and return the resultant -state. -Equivalent to taking the second value of the pair instance -returned by `run-state` function.</pre></div></div><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that returns -the current state.</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that replaces -the current state with specified new state.</pre></div></div><div class="public anchor" id="var-run-state"><h3>run-state</h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><pre class="plaintext">Given a State instance, execute the -wrapped computation and returns a cats.data.Pair -instance with result and new state. - - (def computation (mlet [x (get-state) - y (put-state (inc x))] - (return y))) - - (def initial-state 1) - (run-state computation initial-state) - -This should be return something to: #<Pair [1 2]></pre></div></div><div class="public anchor" id="var-state-monad"><h3>state-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state-t"><h3>state-t</h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><pre class="plaintext">Transform a simple state-monad function -to State class instance. -State class instance work as simple wrapper -for standard clojure function, just for avoid -extend plain function type of clojure.</pre></div></div><div class="public anchor" id="var-state-transformer"><h3>state-transformer</h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-state.3F"><h3>state?</h3><div class="usage"><code>(state? s)</code></div><div class="doc"><pre class="plaintext">Check if value s is instance of -State type.</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><pre class="plaintext">Return a State instance with computation that applies the -specified function to state and returns the old state.</pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.monad.writer.html b/codox/cats.monad.writer.html deleted file mode 100644 index 0a4193c..0000000 --- a/codox/cats.monad.writer.html +++ /dev/null @@ -1,3 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.monad.writer documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.2.0 API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.lazy.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.monad.writer.html#var-listen"><div class="inner"><span>listen</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-log"><div class="inner"><span>log</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-pass"><div class="inner"><span>pass</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-tell"><div class="inner"><span>tell</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-value"><div class="inner"><span>value</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-monad"><div class="inner"><span>writer-monad</span></div></a></li><li class="depth-1"><a href="cats.monad.writer.html#var-writer-transformer"><div class="inner"><span>writer-transformer</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><pre class="plaintext">The Writer Monad. -</pre></div><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-log"><h3>log</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-value"><h3>value</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-monad"><h3>writer-monad</h3><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-writer-transformer"><h3>writer-transformer</h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></body></html> \ No newline at end of file diff --git a/codox/cats.protocols.html b/codox/cats.protocols.html deleted file mode 100644 index c6e28a5..0000000 --- a/codox/cats.protocols.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>cats.protocols documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><div class="sidebar" id="vars"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="cats.protocols.html#var-Applicative"><div class="inner"><span>Applicative</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-fapply"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fapply</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-pure"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pure</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Context"><div class="inner"><span>Context</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-context"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-context</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-get-value"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-value</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Functor"><div class="inner"><span>Functor</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-fmap"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fmap</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-Monad"><div class="inner"><span>Monad</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-mbind"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mbind</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mreturn"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mreturn</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadPlus"><div class="inner"><span>MonadPlus</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mplus"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mplus</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadReader"><div class="inner"><span>MonadReader</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-ask"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ask</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-local"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>local</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadState"><div class="inner"><span>MonadState</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-get-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>get-state</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-put-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>put-state</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-swap-state"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swap-state</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadTrans"><div class="inner"><span>MonadTrans</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-base"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>base</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-inner"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inner</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-lift"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lift</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadWriter"><div class="inner"><span>MonadWriter</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-listen"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>listen</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html#var-pass"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pass</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-tell"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tell</span></div></a></li><li class="depth-1"><a href="cats.protocols.html#var-MonadZero"><div class="inner"><span>MonadZero</span></div></a></li><li class="depth-2"><a href="cats.protocols.html#var-mzero"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mzero</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><pre class="plaintext">Cathegory theory types definition. -</pre></div><div class="public anchor" id="var-Applicative"><h3>Applicative</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3>fapply</h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><pre class="plaintext">Applies the function(s) inside ag's context to the value(s) -inside av's context while preserving the context.</pre></div></div><div class="public anchor" id="var-pure"><h3>pure</h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><pre class="plaintext">Takes any context monadic value ctx and any value v, and puts -the value v in the most minimal context of same type of ctx</pre></div></div></div></div></div><div class="public anchor" id="var-Context"><h3>Context</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A type that is part of a computational context. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3>get-context</h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><pre class="plaintext">Get the monad instance for curent value. -</pre></div></div><div class="public anchor" id="var-get-value"><h3>get-value</h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><pre class="plaintext">Unwrap the value from context. -</pre></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3>Functor</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3>fmap</h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><pre class="plaintext">Applies function f to the value(s) inside the context of the functor fv. -</pre></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3>Monad</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3>mbind</h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><pre class="plaintext"></pre></div></div><div class="public anchor" id="var-mreturn"><h3>mreturn</h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><pre class="plaintext"></pre></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3>MonadPlus</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `MonadZero` that supports the notion of addition. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3>mplus</h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><pre class="plaintext">An associative addition operation. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3>MonadReader</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` with a read-only access to an environment value. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3>ask</h3><div class="usage"><code>(ask m)</code></div><div class="doc"><pre class="plaintext">Return the current environment. -</pre></div></div><div class="public anchor" id="var-local"><h3>local</h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><pre class="plaintext">Create a reader in a modified version of the environment. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3>MonadState</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` formed by functions from states to a new state -and a (poosibly monadic) value.</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3>get-state</h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><pre class="plaintext">Return the current state. -</pre></div></div><div class="public anchor" id="var-put-state"><h3>put-state</h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><pre class="plaintext">Update the state. -</pre></div></div><div class="public anchor" id="var-swap-state"><h3>swap-state</h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><pre class="plaintext">Apply a function to the current state and update it. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3>MonadTrans</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext"></pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3>base</h3><div class="usage"><code>(base mt)</code></div><div class="doc"><pre class="plaintext">Return the base monad of this transformer. -</pre></div></div><div class="public anchor" id="var-inner"><h3>inner</h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><pre class="plaintext">Return the monad that this transformer wraps. -</pre></div></div><div class="public anchor" id="var-lift"><h3>lift</h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><pre class="plaintext">Lift a value from the parameterized monad to the transformer. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3>MonadWriter</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that accumulates a log. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3>listen</h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer, yield a (value, log) pair as a value. -</pre></div></div><div class="public anchor" id="var-pass"><h3>pass</h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><pre class="plaintext">Given a writer whose value is a pair with a function as its second element, -yield a writer which has the first element of the pair as the value and -the result of applying the aforementioned function to the log as the new log.</pre></div></div><div class="public anchor" id="var-tell"><h3>tell</h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><pre class="plaintext">Add the given value to the log. -</pre></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3>MonadZero</h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><pre class="plaintext">A `Monad` that supports the notion of an identity element. -</pre></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3>mzero</h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><pre class="plaintext">The identity element for `ctx`. -</pre></div></div></div></div></div></div></body></html> \ No newline at end of file diff --git a/codox/css/default.css b/codox/css/default.css deleted file mode 100644 index fcabf4e..0000000 --- a/codox/css/default.css +++ /dev/null @@ -1,455 +0,0 @@ -body { - font-family: Helvetica, Arial, sans-serif; - font-size: 15px; -} - -pre, code { - font-family: Monaco, DejaVu Sans Mono, Consolas, monospace; - font-size: 9pt; - margin: 15px 0; -} - -h2 { - font-weight: normal; - font-size: 28px; - padding: 10px 0 2px 0; - margin: 0; -} - -#header, #content, .sidebar { - position: fixed; -} - -#header { - top: 0; - left: 0; - right: 0; - height: 20px; - background: #444; - color: #fff; - padding: 5px 7px; -} - -#content { - top: 30px; - right: 0; - bottom: 0; - overflow: auto; - background: #fff; - color: #333; - padding: 0 18px; -} - -.sidebar { - position: fixed; - top: 30px; - bottom: 0; - overflow: auto; -} - -#namespaces { - background: #e2e2e2; - border-right: solid 1px #cccccc; - left: 0; - width: 250px; -} - -#vars { - background: #f2f2f2; - border-right: solid 1px #cccccc; - left: 251px; - width: 200px; -} - -.namespace-index { - left: 251px; -} - -.namespace-docs { - left: 452px; -} - -#header { - background: -moz-linear-gradient(top, #555 0%, #222 100%); - background: -webkit-linear-gradient(top, #555 0%, #333 100%); - background: -o-linear-gradient(top, #555 0%, #222 100%); - background: -ms-linear-gradient(top, #555 0%, #222 100%); - background: linear-gradient(top, #555 0%, #222 100%); - box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); - z-index: 100; -} - -#header h1 { - margin: 0; - padding: 0; - font-size: 12pt; - font-weight: lighter; - text-shadow: -1px -1px 0px #333; -} - -#header a, .sidebar a { - display: block; - text-decoration: none; -} - -#header a { - color: #fff; -} - -.sidebar a { - color: #333; -} - -#header h2 { - float: right; - font-size: 9pt; - font-weight: normal; - margin: 3px 3px; - padding: 0; - color: #bbb; -} - -#header h2 a { - display: inline; -} - -.sidebar h3 { - margin: 0; - padding: 10px 10px 0 10px; - font-size: 19px; - font-weight: normal; -} - -.sidebar ul { - padding: 0.5em 0em; - margin: 0; -} - -.sidebar li { - display: block; - vertical-align: middle; -} - -.sidebar li a, .sidebar li .no-link { - border-left: 3px solid transparent; - padding: 0 7px; - white-space: nowrap; -} - -.sidebar li .no-link { - display: block; - color: #777; - font-style: italic; -} - -.sidebar li .inner { - display: inline-block; - padding-top: 7px; - height: 24px; -} - -.sidebar li a, .sidebar li .tree { - height: 31px; -} - -.depth-1 .inner { padding-left: 2px; } -.depth-2 .inner { padding-left: 6px; } -.depth-3 .inner { padding-left: 20px; } -.depth-4 .inner { padding-left: 34px; } -.depth-5 .inner { padding-left: 48px; } -.depth-6 .inner { padding-left: 62px; } - -.sidebar li .tree { - display: block; - float: left; - position: relative; - top: -10px; - margin: 0 4px 0 0; - padding: 0; -} - -.sidebar li.depth-1 .tree { - display: none; -} - -.sidebar li .tree .top, .sidebar li .tree .bottom { - display: block; - margin: 0; - padding: 0; - width: 7px; -} - -.sidebar li .tree .top { - border-left: 1px solid #aaa; - border-bottom: 1px solid #aaa; - height: 19px; -} - -.sidebar li .tree .bottom { - height: 22px; -} - -.sidebar li.branch .tree .bottom { - border-left: 1px solid #aaa; -} - -#namespaces li.current a { - border-left: 3px solid #a33; - color: #a33; -} - -#vars li.current a { - border-left: 3px solid #33a; - color: #33a; -} - -#content h3 { - font-size: 13pt; - font-weight: bold; -} - -.public h3 { - margin: 0; - float: left; -} - -.usage { - clear: both; -} - -.public { - margin: 0; - border-top: 1px solid #e0e0e0; - padding-top: 14px; - padding-bottom: 6px; -} - -.public:last-child { - margin-bottom: 20%; -} - -.members .public:last-child { - margin-bottom: 0; -} - -.members { - margin: 15px 0; -} - -.members h4 { - color: #555; - font-weight: normal; - font-variant: small-caps; - margin: 0 0 5px 0; -} - -.members .inner { - padding-top: 5px; - padding-left: 12px; - margin-top: 2px; - margin-left: 7px; - border-left: 1px solid #bbb; -} - -#content .members .inner h3 { - font-size: 12pt; -} - -.members .public { - border-top: none; - margin-top: 0; - padding-top: 6px; - padding-bottom: 0; -} - -.members .public:first-child { - padding-top: 0; -} - -h4.type, -h4.dynamic, -h4.added, -h4.deprecated { - float: left; - margin: 3px 10px 15px 0; - font-size: 15px; - font-weight: bold; - font-variant: small-caps; -} - -.public h4.type, -.public h4.dynamic, -.public h4.added, -.public h4.deprecated { - font-size: 13px; - font-weight: bold; - margin: 3px 0 0 10px; -} - -.members h4.type, -.members h4.added, -.members h4.deprecated { - margin-top: 1px; -} - -h4.type { - color: #717171; -} - -h4.dynamic { - color: #9933aa; -} - -h4.added { - color: #508820; -} - -h4.deprecated { - color: #880000; -} - -.namespace { - margin-bottom: 30px; -} - -.namespace:last-child { - margin-bottom: 10%; -} - -.index { - padding: 0; - font-size: 80%; - margin: 15px 0; - line-height: 16px; -} - -.index * { - display: inline; -} - -.index p { - padding-right: 3px; -} - -.index li { - padding-right: 5px; -} - -.index ul { - padding-left: 0; -} - -.usage code { - display: block; - color: #008; - margin: 2px 0; -} - -.usage code:first-child { - padding-top: 10px; -} - -p { - margin: 15px 0; -} - -.public p:first-child, .public pre.plaintext { - margin-top: 12px; -} - -.doc { - margin: 0 0 26px 0; - clear: both; -} - -.public .doc { - margin: 0; -} - -.namespace-index .doc { - margin-bottom: 20px; -} - -.namespace-index .namespace .doc { - margin-bottom: 10px; -} - -.markdown { - line-height: 18px; - font-size: 14px; -} - -.doc, .public, .namespace .index { - max-width: 680px; - overflow-x: visible; -} - -.markdown code, .src-link a { - background: #f6f6f6; - border: 1px solid #e4e4e4; - border-radius: 2px; -} - -.markdown pre { - background: #f4f4f4; - border: 1px solid #e0e0e0; - border-radius: 2px; - padding: 5px 10px; - margin: 0 10px; -} - -.markdown pre code { - background: transparent; - border: none; -} - -.doc ul, .doc ol { - padding-left: 30px; -} - -.doc table { - border-collapse: collapse; - margin: 0 10px; -} - -.doc table td, .doc table th { - border: 1px solid #dddddd; - padding: 4px 6px; -} - -.doc table th { - background: #f2f2f2; -} - -.doc dl { - margin: 0 10px 20px 10px; -} - -.doc dl dt { - font-weight: bold; - margin: 0; - padding: 3px 0; - border-bottom: 1px solid #ddd; -} - -.doc dl dd { - padding: 5px 0; - margin: 0 0 5px 10px; -} - -.doc abbr { - border-bottom: 1px dotted #333; - font-variant: none - cursor: help; -} - -.src-link { - margin-bottom: 15px; -} - -.src-link a { - font-size: 70%; - padding: 1px 4px; - text-decoration: none; - color: #5555bb; -} \ No newline at end of file diff --git a/codox/index.html b/codox/index.html deleted file mode 100644 index 0536df7..0000000 --- a/codox/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><script src="js/jquery.min.js" type="text/javascript"></script><script src="js/page_effects.js" type="text/javascript"></script><title>Cats 0.3.0-SNAPSHOT API documentation</title></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html">Cats 0.3.0-SNAPSHOT API documentation</a></h1></div><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul></ul></div><div class="namespace-index" id="content"><h2>Cats 0.3.0-SNAPSHOT</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></div></body></html> \ No newline at end of file diff --git a/codox/js/jquery.min.js b/codox/js/jquery.min.js deleted file mode 100644 index 73f33fb..0000000 --- a/codox/js/jquery.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) -},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/codox/js/page_effects.js b/codox/js/page_effects.js deleted file mode 100644 index ef8120d..0000000 --- a/codox/js/page_effects.js +++ /dev/null @@ -1,99 +0,0 @@ -function visibleInParent(element) { - var position = $(element).position().top - return position > -50 && position < ($(element).offsetParent().height() - 50) -} - -function hasFragment(link, fragment) { - return $(link).attr("href").indexOf("#" + fragment) != -1 -} - -function findLinkByFragment(elements, fragment) { - return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() -} - -function scrollToCurrentVarLink(elements) { - var elements = $(elements); - var parent = elements.offsetParent(); - - if (elements.length == 0) return; - - var top = elements.first().position().top; - var bottom = elements.last().position().top + elements.last().height(); - - if (top >= 0 && bottom <= parent.height()) return; - - if (top < 0) { - parent.scrollTop(parent.scrollTop() + top); - } - else if (bottom > parent.height()) { - parent.scrollTop(parent.scrollTop() + bottom - parent.height()); - } -} - -function setCurrentVarLink() { - $('#vars a').parent().removeClass('current') - $('.anchor'). - filter(function(index) { return visibleInParent(this) }). - each(function(index, element) { - findLinkByFragment("#vars a", element.id). - parent(). - addClass('current') - }); - scrollToCurrentVarLink('#vars .current'); -} - -var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) - -function scrollPositionId(element) { - var directory = window.location.href.replace(/[^\/]+\.html$/, '') - return 'scroll::' + $(element).attr('id') + '::' + directory -} - -function storeScrollPosition(element) { - if (!hasStorage) return; - localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) - localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) -} - -function recallScrollPosition(element) { - if (!hasStorage) return; - $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) - $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) -} - -function persistScrollPosition(element) { - recallScrollPosition(element) - $(element).scroll(function() { storeScrollPosition(element) }) -} - -function sidebarContentWidth(element) { - var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) - return Math.max.apply(Math, widths) -} - -function resizeSidebars() { - var nsWidth = sidebarContentWidth('#namespaces') + 30 - var varWidth = 0 - - if ($('#vars').length != 0) { - varWidth = sidebarContentWidth('#vars') + 30 - } - - // snap to grid - var snap = 30; - nsWidth = Math.ceil(nsWidth / snap) * snap; - varWidth = Math.ceil(varWidth / snap) * snap; - - $('#namespaces').css('width', nsWidth) - $('#vars').css('width', varWidth) - $('#vars, .namespace-index').css('left', nsWidth + 1) - $('.namespace-docs').css('left', nsWidth + varWidth + 2) -} - -$(window).ready(resizeSidebars) -$(window).ready(setCurrentVarLink) -$(window).ready(function() { persistScrollPosition('#namespaces')}) -$(window).ready(function() { - $('#content').scroll(setCurrentVarLink) - $(window).resize(setCurrentVarLink) -}) diff --git a/devel/api/cats.builtin.html b/devel/api/cats.builtin.html deleted file mode 100644 index 40e7629..0000000 --- a/devel/api/cats.builtin.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.core.html b/devel/api/cats.core.html deleted file mode 100644 index 2b722ce..0000000 --- a/devel/api/cats.core.html +++ /dev/null @@ -1,71 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><div class="markdown"><p>Alias of fmap.</p></div></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative fapply.</p></div></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Example: (>>= (just 1) (comp just inc) (comp just inc)) ;=> #<Just [3]></p></div></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context mv and any function, applies a function to value of mv.</p></div></div></div><div class="public anchor" id="var-errlet"><h3><a href="#var-errlet">errlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(errlet bindings & body)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s conext and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p></div></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> -<pre><code>(require '[cats.monad.moaybe :as maybe]) -(require '[cats.core :as m]) - -(m/filter (partial < 2) (maybe/just 3)) -;=> <Just [3]> - -(m/filter (partial < 4) (maybe/just 3)) -;=> <Nothing> -</code></pre></div></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>(require ‘[cats.monad.maybe :as maybe]) (require ’[cats.core :as m])</p><p>(m/forseq [2 3] maybe/just) ;=> <Just <a href="null">2 3</a>></p><p>(m/forseq [1 2] (fn [v] (if (odd? v) (maybe/just v) (maybe/nothing)))) ;=> <Nothing></p></div></div></div><div class="public anchor" id="var-get-current-context"><h3><a href="#var-get-current-context">get-current-context</a></h3><div class="usage"><code>(get-current-context)</code><code>(get-current-context default)</code></div><div class="doc"><div class="markdown"><p>Get current context or obtain it from the provided instance.</p></div></div></div><div class="public anchor" id="var-get-value"><h3><a href="#var-get-value">get-value</a></h3><div class="usage"><code>(get-value v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> -<pre><code>(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(def monad+ (m/lift-m 2 +)) - -(monad+ (maybe/just 1) (maybe/just 2)) -;=> <Just [3]> - -(monad+ (maybe/just 1) (maybe/nothing)) -;=> <Nothing> - -(monad+ [0 2 4] [1 2]) -;=> [1 2 3 4 5 6] -</code></pre></div></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> -<pre><code>(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(m/mapseq maybe/just [2 3]) -;=> <Just [[2 3]]> - -(m/mapseq (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing))) - [1 2]) -;=> <Nothing> -</code></pre></div></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> -<pre><code>(bind (just 1) - (fn [a] - (bind (just (inc a)) - (fn [b] - (return (* b 2)))))) -;=> #<Just [4]> -</code></pre><p>Now see how this code can be more clear if you are using mlet macro for do it:</p> -<pre><code>(mlet [a (just 1) - b (just (inc a))] - (return (* b 2))) -;=> #<Just [4]> -</code></pre></div></div></div><div class="public anchor" id="var-mlet-with"><h3><a href="#var-mlet-with">mlet-with</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet-with monad bindings & body)</code></div><div class="doc"><div class="markdown"><p>A helper macro for using monad transformers, is the same as mlet but specifying the monadic context. So, instead of writing:</p> -<pre><code>(with-monad (maybe-transformer vector-monad) - (mlet [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2)))) -;=> [#<Just [4]> #<Just [6]>] -</code></pre><p>You can just write:</p> -<pre><code>(mlet-with (maybe-transformer vector-monad) - [a [(just 1) (just 2)] - b [(just (inc a))]] - (return (* b 2))) -;=> [#<Just [4]> #<Just [6]>] -</code></pre></div></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p></div></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure.</p></div></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> -<pre><code>(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) - -(m/sequence [(maybe/just 2) (maybe/just 3)]) -;=> <Just [[2, 3]]> - -(m/sequence [(maybe/nothing) (maybe/just 3)]) -;=> <Nothing> -</code></pre></div></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value.</p><p>Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value.</p><p>Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.data.html b/devel/api/cats.data.html deleted file mode 100644 index e66ed94..0000000 --- a/devel/api/cats.data.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.channel.html b/devel/api/cats.monad.channel.html deleted file mode 100644 index 0d05ee4..0000000 --- a/devel/api/cats.monad.channel.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel-monad"><h3><a href="#var-channel-monad">channel-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.continuation.html b/devel/api/cats.monad.continuation.html deleted file mode 100644 index 4bc0ca7..0000000 --- a/devel/api/cats.monad.continuation.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.either.html b/devel/api/cats.monad.either.html deleted file mode 100644 index b867c37..0000000 --- a/devel/api/cats.monad.either.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either (Error) Monad.</p></div></div><div class="public anchor" id="var-either-monad"><h3><a href="#var-either-monad">either-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-from-either"><h3><a href="#var-from-either">from-either</a></h3><div class="usage"><code>(from-either mv)</code></div><div class="doc"><div class="markdown"><p>Return inner value of either monad.</p></div></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>Left constructor for Either type.</p></div></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>Right constructor for Either type.</p></div></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? mv)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.exception.html b/devel/api/cats.monad.exception.html deleted file mode 100644 index 04e115e..0000000 --- a/devel/api/cats.monad.exception.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Try Monad.</p><p>The Try type represents a computation that may either result in an exception, or return a successfully computed value. It’s similar to, but semantically different from the Either type.</p></div></div><div class="public anchor" id="var-exception-monad"><h3><a href="#var-exception-monad">exception-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>The exception monad type definition.</p></div></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? e)</code></div><div class="doc"><div class="markdown"><p>Check if provided parameter is an instance of exception or not.</p></div></div></div><div class="public anchor" id="var-exec-try-on"><h3><a href="#var-exec-try-on">exec-try-on</a></h3><div class="usage"><code>(exec-try-on func)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-exec-try-or-else"><h3><a href="#var-exec-try-or-else">exec-try-or-else</a></h3><div class="usage"><code>(exec-try-or-else func defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-exec-try-or-recover"><h3><a href="#var-exec-try-or-recover">exec-try-or-recover</a></h3><div class="usage"><code>(exec-try-or-recover func recoverfn)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exceptio, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Check if a provided parameter is a failure instance.</p></div></div></div><div class="public anchor" id="var-from-failure"><h3><a href="#var-from-failure">from-failure</a></h3><div class="usage"><code>(from-failure fv)</code></div><div class="doc"><div class="markdown"><p>Extract value from failure container without doing nothing.</p></div></div></div><div class="public anchor" id="var-from-success"><h3><a href="#var-from-success">from-success</a></h3><div class="usage"><code>(from-success sv)</code></div><div class="doc"><div class="markdown"><p>Extract value from success container without doing nothing.</p></div></div></div><div class="public anchor" id="var-from-try"><h3><a href="#var-from-try">from-try</a></h3><div class="usage"><code>(from-try v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Check if a provided parameter is a success instance</p></div></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try.3F"><h3><a href="#var-try.3F">try?</a></h3><div class="usage"><code>(try? v)</code></div><div class="doc"><div class="markdown"><p>Check if a provided parameter is instance of Try monad.</p></div></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.html b/devel/api/cats.monad.html deleted file mode 100644 index 8a11e94..0000000 --- a/devel/api/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.identity.html b/devel/api/cats.monad.identity.html deleted file mode 100644 index f423edb..0000000 --- a/devel/api/cats.monad.identity.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>Default constructor for identity type.</p></div></div></div><div class="public anchor" id="var-identity-monad"><h3><a href="#var-identity-monad">identity-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.maybe.html b/devel/api/cats.monad.maybe.html deleted file mode 100644 index 96fdca4..0000000 --- a/devel/api/cats.monad.maybe.html +++ /dev/null @@ -1,11 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe Monad.</p></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad. Accepts an optional default value.</p><p>Let see some examples:</p> -<pre><code>(from-maybe (just 1)) -;=> 1 -(from-maybe (just 1) 42) -;=> 1 -(from-maybe (nothing)) -;=> nil -(from-maybe (nothing) 42) -;=> 42 -</code></pre></div></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just v)</code><code>(just)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-maybe-monad"><h3><a href="#var-maybe-monad">maybe-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.reader.html b/devel/api/cats.monad.reader.html deleted file mode 100644 index b361d88..0000000 --- a/devel/api/cats.monad.reader.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>Transform a simple reader-monad function to Reader class instance. Reader class instance work as simple wrapper for standard clojure function, just for avoid extend plain function type of clojure.</p></div></div></div><div class="public anchor" id="var-reader-monad"><h3><a href="#var-reader-monad">reader-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Check if value s is instance of Reader type.</p></div></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.state.html b/devel/api/cats.monad.state.html deleted file mode 100644 index c15b95b..0000000 --- a/devel/api/cats.monad.state.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div></div><div class="public anchor" id="var-state-monad"><h3><a href="#var-state-monad">state-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>Transform a simple state-monad function to State class instance. State class instance work as simple wrapper for standard clojure function, just for avoid extend plain function type of clojure.</p></div></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Check if value s is instance of State type.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.monad.writer.html b/devel/api/cats.monad.writer.html deleted file mode 100644 index 04c9e77..0000000 --- a/devel/api/cats.monad.writer.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-writer-monad"><h3><a href="#var-writer-monad">writer-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/cats.protocols.html b/devel/api/cats.protocols.html deleted file mode 100644 index 9254add..0000000 --- a/devel/api/cats.protocols.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Cathegory theory types definition.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type that is part of a computational context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div><div class="public anchor" id="var-get-value"><h3><a href="#var-get-value">get-value</a></h3><div class="usage"><code>(get-value _)</code></div><div class="doc"><div class="markdown"><p>Unwrap the value from context.</p></div></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>MonadZero</code> that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> with a read-only access to an environment value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"><code>(ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> formed by functions from states to a new state and a (poosibly monadic) value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> that accumulates a log.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A <code>Monad</code> that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for <code>ctx</code>.</p></div></div></div></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/css/default.css b/devel/api/css/default.css deleted file mode 100644 index 257ab2c..0000000 --- a/devel/api/css/default.css +++ /dev/null @@ -1,442 +0,0 @@ -@import url(http://fonts.googleapis.com/css?family=Droid+Sans+Mono:200,300,400); -@import url(http://fonts.googleapis.com/css?family=Lato:light,regular); -@import url(http://fonts.googleapis.com/css?family=Ubuntu:300,400,500); - -body { - font-family: "Lato", Helvetica, Arial, sans-serif; - font-weight: 300; - color:#585858; - font-size: 100%; - margin: 0px; -} - -pre, code { - font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; - font-weight: 300; -} - -section.container { - display: flex; - font-size: 100%; -} - -h2 { - font-weight: normal; - font-size: 3em; - padding: 10px 0 2px 0; - margin: 0; -} - -header { - color: #333; - padding: 10px; -} - -header small { - font-style: italic; -} - -header h1 { - margin: 0; - padding: 0; - /* font-size: 12pt; */ - font-weight: lighter; - /* text-shadow: -1px -1px 0px #333; */ -} - -header h1 a { - color: #333; - /* font-size: 32px; */ - font-weight: 400; - text-decoration: none; -} - -#content { - overflow: auto; - background: #fff; - color: #333; - padding: 0 18px; - font-size: 1.3em; -} - -#namespaces { - border-right: solid 1px #cccccc; - min-width: 200px; - padding-right: 15px; -} - -#vars { - border-right: solid 1px #cccccc; - width: 200px; -} - -.sidebar { - overflow: auto; -} - -.sidebar a { - color: #333; - display: block; - text-decoration: none; -} - -.sidebar h3 { - margin: 0; - padding: 10px 10px 0 10px; - font-size: 19px; - font-weight: normal; -} - -.sidebar ul { - padding: 0.5em 0em; - margin: 0; -} - -.sidebar li { - display: block; - vertical-align: middle; -} - -.sidebar li a, .sidebar li .no-link { - border-left: 3px solid transparent; - padding: 0 15px; - white-space: nowrap; -} - -.sidebar li .no-link { - display: block; - color: #777; - font-style: italic; -} - -.sidebar li .inner { - display: inline-block; - padding-top: 7px; - height: 24px; -} - -.sidebar li a, .sidebar li .tree { - height: 31px; - /* height: 25px; */ -} - -.depth-1 .inner { padding-left: 2px; } -.depth-2 .inner { padding-left: 6px; } -.depth-3 .inner { padding-left: 20px; } -.depth-4 .inner { padding-left: 34px; } -.depth-5 .inner { padding-left: 48px; } -.depth-6 .inner { padding-left: 62px; } - -.sidebar li .tree { - display: block; - float: left; - position: relative; - top: -10px; - margin: 0 4px 0 0; - padding: 0; -} - -.sidebar li.depth-1 .tree { - display: none; -} - -.sidebar li .tree .top, .sidebar li .tree .bottom { - display: block; - margin: 0; - padding: 0; - width: 7px; -} - -.sidebar li .tree .top { - border-left: 1px solid #aaa; - border-bottom: 1px solid #aaa; - height: 19px; -} - -.sidebar li .tree .bottom { - height: 22px; -} - -.sidebar li.branch .tree .bottom { - border-left: 1px solid #aaa; -} - -#namespaces li.current a { - border-left: 3px solid #a33; - border-left: 3px solid #7a2518; - color: #a33; - color: #7a2518; - -} - -#vars li.current a { - border-left: 3px solid #33a; - color: #33a; -} - -.namespace-docs h2 { - color: #7a2518; -} - -.namespace-docs h3 a { - color: #ba3925; - font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; - font-weight: 400; - text-decoration: none; -} - -.namespace-docs .usage code { - display: block; - color: #777; - margin: 2px 0; - font-size: 0.6em; -} - -/* .usage code:first-child { */ -/* padding-top: 10px; */ -/* } */ - - - -.namespace-index h3 a { - text-decoration: none; - color: #ba3925; - font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; - font-weight: 300; -} - -.public h3 { - margin: 0; -} - -.public { - margin: 0; - border-top: 1px solid #efefef; - padding-top: 14px; - padding-bottom: 6px; -} - -.public:last-child { - margin-bottom: 20%; -} - -.members .public:last-child { - margin-bottom: 0; -} - -.members { - margin: 15px 0; -} - -.members h4 { - color: #555; - font-weight: normal; - font-variant: small-caps; - margin: 0 0 5px 0; -} - -.members .inner { - padding-top: 5px; - padding-left: 12px; - margin-top: 2px; - margin-left: 7px; - border-left: 1px solid #bbb; -} - -#content .members .inner h3 { - /* font-size: 12pt; */ -} - -.members .public { - border-top: none; - margin-top: 0; - padding-top: 6px; - padding-bottom: 0; -} - -.members .public:first-child { - padding-top: 0; -} - -h4.type, -h4.dynamic, -h4.added, -h4.deprecated { - margin: 3px 10px 10spx 0; - font-weight: bold; - font-variant: small-caps; -} - -.public h4.type, -.public h4.dynamic, -.public h4.added, -.public h4.deprecated { - font-weight: bold; - /* margin: 3px 0 0 10px; */ - font-size: 0.7em; -} - -.members h4.type, -.members h4.added, -.members h4.deprecated { - margin-top: 1px; -} - -h4.type { - color: #717171; -} - -h4.dynamic { - color: #9933aa; -} - -h4.added { - color: #508820; -} - -h4.deprecated { - color: #880000; -} - -.namespace { - margin-bottom: 40px; -} - -.namespace:last-child { - margin-bottom: 10%; -} - -.index { - padding: 0; - margin: 15px 0; -} - -.index * { - display: inline; -} - -.index p { - padding-right: 3px; -} - -.index li { - padding-right: 5px; -} - -.index li a { - color: #333; - font-family: "Droid Sans Mono","DejaVu Sans Mono","Monospace",monospace; - font-size: 0.8em; - text-decoration: none; - font-weight: 300; -} - -.index ul { - padding-left: 0; -} - -p { - margin: 15px 0; -} - -.public p:first-child, .public pre.plaintext { - margin-top: 12px; -} - -.doc { - margin: 0 0 26px 0; - clear: both; -} - -.public .doc { - margin: 0; -} - -.namespace-index .doc { - margin-bottom: 20px; -} - -.namespace-index .namespace .doc { - margin-bottom: 10px; -} - -.markdown { - /* line-height: 18px; */ - /* font-size: 16px; */ -} - -.doc, .public, .namespace .index { - max-width: 780px; - overflow-x: visible; -} - -.markdown code, .src-link a { - border-radius: 2px; - font-size: 0.8em; - color: #444; -} - -.markdown pre { - background: #f4f4f4; - border: 1px solid #e0e0e0; - /* border-radius: 2px; */ - padding: 5px 5px; - border-top: 1px solid #e0e0e0; - border-bottom: 1px solid #e0e0e0; -} - -.markdown pre code { - background: transparent; - border: none; -} - -.doc ul, .doc ol { - padding-left: 30px; -} - -.doc table { - border-collapse: collapse; - margin: 0 10px; -} - -.doc table td, .doc table th { - border: 1px solid #dddddd; - padding: 4px 6px; -} - -.doc table th { - background: #f2f2f2; -} - -.doc dl { - margin: 0 10px 20px 10px; -} - -.doc dl dt { - font-weight: bold; - margin: 0; - padding: 3px 0; - border-bottom: 1px solid #ddd; -} - -.doc dl dd { - padding: 5px 0; - margin: 0 0 5px 10px; -} - -.doc abbr { - border-bottom: 1px dotted #333; - font-variant: none - cursor: help; -} - -.src-link { - margin-bottom: 15px; -} - -.src-link a { - /* font-size: 70%; */ - padding: 1px 4px; - text-decoration: none; - color: #5555bb; -} \ No newline at end of file diff --git a/devel/api/index.html b/devel/api/index.html deleted file mode 100644 index 5b7fb80..0000000 --- a/devel/api/index.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.4.0-SNAPSHOT API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-*context*">*context*</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-errlet">errlet</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-get-value">get-value</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mlet-with">mlet-with</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.channel.html">cats.monad.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.channel.html#var-channel-monad">channel-monad</a> </li><li> <a href="cats.monad.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either (Error) Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-either-monad">either-monad</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Try Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception-monad">exception-monad</a> </li><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-on">exec-try-on</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-else">exec-try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-exec-try-or-recover">exec-try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-from-failure">from-failure</a> </li><li> <a href="cats.monad.exception.html#var-from-success">from-success</a> </li><li> <a href="cats.monad.exception.html#var-from-try">from-try</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-try.3F">try?</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-monad">identity-monad</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-monad">maybe-monad</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-monad">reader-monad</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-monad">state-monad</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-monad">writer-monad</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Cathegory theory types definition.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/devel/api/js/jquery.min.js b/devel/api/js/jquery.min.js deleted file mode 100644 index 73f33fb..0000000 --- a/devel/api/js/jquery.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) -},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/devel/api/js/page_effects.js b/devel/api/js/page_effects.js deleted file mode 100644 index ef8120d..0000000 --- a/devel/api/js/page_effects.js +++ /dev/null @@ -1,99 +0,0 @@ -function visibleInParent(element) { - var position = $(element).position().top - return position > -50 && position < ($(element).offsetParent().height() - 50) -} - -function hasFragment(link, fragment) { - return $(link).attr("href").indexOf("#" + fragment) != -1 -} - -function findLinkByFragment(elements, fragment) { - return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() -} - -function scrollToCurrentVarLink(elements) { - var elements = $(elements); - var parent = elements.offsetParent(); - - if (elements.length == 0) return; - - var top = elements.first().position().top; - var bottom = elements.last().position().top + elements.last().height(); - - if (top >= 0 && bottom <= parent.height()) return; - - if (top < 0) { - parent.scrollTop(parent.scrollTop() + top); - } - else if (bottom > parent.height()) { - parent.scrollTop(parent.scrollTop() + bottom - parent.height()); - } -} - -function setCurrentVarLink() { - $('#vars a').parent().removeClass('current') - $('.anchor'). - filter(function(index) { return visibleInParent(this) }). - each(function(index, element) { - findLinkByFragment("#vars a", element.id). - parent(). - addClass('current') - }); - scrollToCurrentVarLink('#vars .current'); -} - -var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) - -function scrollPositionId(element) { - var directory = window.location.href.replace(/[^\/]+\.html$/, '') - return 'scroll::' + $(element).attr('id') + '::' + directory -} - -function storeScrollPosition(element) { - if (!hasStorage) return; - localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) - localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) -} - -function recallScrollPosition(element) { - if (!hasStorage) return; - $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) - $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) -} - -function persistScrollPosition(element) { - recallScrollPosition(element) - $(element).scroll(function() { storeScrollPosition(element) }) -} - -function sidebarContentWidth(element) { - var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) - return Math.max.apply(Math, widths) -} - -function resizeSidebars() { - var nsWidth = sidebarContentWidth('#namespaces') + 30 - var varWidth = 0 - - if ($('#vars').length != 0) { - varWidth = sidebarContentWidth('#vars') + 30 - } - - // snap to grid - var snap = 30; - nsWidth = Math.ceil(nsWidth / snap) * snap; - varWidth = Math.ceil(varWidth / snap) * snap; - - $('#namespaces').css('width', nsWidth) - $('#vars').css('width', varWidth) - $('#vars, .namespace-index').css('left', nsWidth + 1) - $('.namespace-docs').css('left', nsWidth + varWidth + 2) -} - -$(window).ready(resizeSidebars) -$(window).ready(setCurrentVarLink) -$(window).ready(function() { persistScrollPosition('#namespaces')}) -$(window).ready(function() { - $('#content').scroll(setCurrentVarLink) - $(window).resize(setCurrentVarLink) -}) diff --git a/devel/index.html b/devel/index.html deleted file mode 100644 index 162a622..0000000 --- a/devel/index.html +++ /dev/null @@ -1,1620 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<meta charset="UTF-8"> -<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.2"> -<meta name="author" content="Andrey Antukh & Alejandro Gómez"> -<title>Cats Documentation</title> -<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400"> -<style> -/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ -/* Remove the comments around the @import statement below when using this as a custom stylesheet */ -/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/ -article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} -audio,canvas,video{display:inline-block} -audio:not([controls]){display:none;height:0} -[hidden],template{display:none} -script{display:none!important} -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} -body{margin:0} -a{background:transparent} -a:focus{outline:thin dotted} -a:active,a:hover{outline:0} -h1{font-size:2em;margin:.67em 0} -abbr[title]{border-bottom:1px dotted} -b,strong{font-weight:bold} -dfn{font-style:italic} -hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} -mark{background:#ff0;color:#000} -code,kbd,pre,samp{font-family:monospace;font-size:1em} -pre{white-space:pre-wrap} -q{quotes:"\201C" "\201D" "\2018" "\2019"} -small{font-size:80%} -sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} -sup{top:-.5em} -sub{bottom:-.25em} -img{border:0} -svg:not(:root){overflow:hidden} -figure{margin:0} -fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} -legend{border:0;padding:0} -button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} -button,input{line-height:normal} -button,select{text-transform:none} -button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} -button[disabled],html input[disabled]{cursor:default} -input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} -input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} -button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} -textarea{overflow:auto;vertical-align:top} -table{border-collapse:collapse;border-spacing:0} -*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} -html,body{font-size:100%} -body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} -a:hover{cursor:pointer} -img,object,embed{max-width:100%;height:auto} -object,embed{height:100%} -img{-ms-interpolation-mode:bicubic} -#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} -.left{float:left!important} -.right{float:right!important} -.text-left{text-align:left!important} -.text-right{text-align:right!important} -.text-center{text-align:center!important} -.text-justify{text-align:justify!important} -.hide{display:none} -.antialiased,body{-webkit-font-smoothing:antialiased} -img{display:inline-block;vertical-align:middle} -textarea{height:auto;min-height:50px} -select{width:100%} -p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} -.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} -div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} -a{color:#2156a5;text-decoration:underline;line-height:inherit} -a:hover,a:focus{color:#1d4b8f} -a img{border:none} -p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} -p aside{font-size:.875em;line-height:1.35;font-style:italic} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} -h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} -h1{font-size:2.125em} -h2{font-size:1.6875em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} -h4,h5{font-size:1.125em} -h6{font-size:1em} -hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} -em,i{font-style:italic;line-height:inherit} -strong,b{font-weight:bold;line-height:inherit} -small{font-size:60%;line-height:inherit} -code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} -ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} -ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} -ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} -ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} -ul.square{list-style-type:square} -ul.circle{list-style-type:circle} -ul.disc{list-style-type:disc} -ul.no-bullet{list-style:none} -ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} -dl dt{margin-bottom:.3125em;font-weight:bold} -dl dd{margin-bottom:1.25em} -abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} -abbr{text-transform:none} -blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} -blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} -blockquote cite:before{content:"\2014 \0020"} -blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} -blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} -@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} -h1{font-size:2.75em} -h2{font-size:2.3125em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} -h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} -table thead,table tfoot{background:#f7f8f7;font-weight:bold} -table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} -table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} -table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} -table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} -h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} -.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} -.clearfix:after,.float-group:after{clear:both} -*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} -pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} -.keyseq{color:rgba(51,51,51,.8)} -kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} -.keyseq kbd:first-child{margin-left:0} -.keyseq kbd:last-child{margin-right:0} -.menuseq,.menu{color:rgba(0,0,0,.8)} -b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} -b.button:before{content:"[";padding:0 3px 0 2px} -b.button:after{content:"]";padding:0 2px 0 3px} -p a>code:hover{color:rgba(0,0,0,.9)} -#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} -#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} -#header:after,#content:after,#footnotes:after,#footer:after{clear:both} -#content{margin-top:1.25em} -#content:before{content:none} -#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} -#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} -#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} -#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} -#header .details span:first-child{margin-left:-.125em} -#header .details span.email a{color:rgba(0,0,0,.85)} -#header .details br{display:none} -#header .details br+span:before{content:"\00a0\2013\00a0"} -#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} -#header .details br+span#revremark:before{content:"\00a0|\00a0"} -#header #revnumber{text-transform:capitalize} -#header #revnumber:after{content:"\00a0"} -#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} -#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} -#toc>ul{margin-left:.125em} -#toc ul.sectlevel0>li>a{font-style:italic} -#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} -#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} -#toc a{text-decoration:none} -#toc a:active{text-decoration:underline} -#toctitle{color:#7a2518;font-size:1.2em} -@media only screen and (min-width:768px){#toctitle{font-size:1.375em} -body.toc2{padding-left:15em;padding-right:0} -#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} -#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} -#toc.toc2>ul{font-size:.9em;margin-bottom:0} -#toc.toc2 ul ul{margin-left:0;padding-left:1em} -#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} -body.toc2.toc-right{padding-left:0;padding-right:15em} -body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} -#toc.toc2{width:20em} -#toc.toc2 #toctitle{font-size:1.375em} -#toc.toc2>ul{font-size:.95em} -#toc.toc2 ul ul{padding-left:1.25em} -body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -#content #toc>:first-child{margin-top:0} -#content #toc>:last-child{margin-bottom:0} -#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} -#footer-text{color:rgba(255,255,255,.8);line-height:1.44} -.sect1{padding-bottom:.625em} -@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} -#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} -#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} -#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} -#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} -#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} -.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} -.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} -table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} -.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} -table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} -.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} -.admonitionblock>table td.icon{text-align:center;width:80px} -.admonitionblock>table td.icon img{max-width:none} -.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} -.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} -.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} -.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} -.exampleblock>.content>:first-child{margin-top:0} -.exampleblock>.content>:last-child{margin-bottom:0} -.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -.sidebarblock>:first-child{margin-top:0} -.sidebarblock>:last-child{margin-bottom:0} -.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} -.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} -.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} -.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} -.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} -.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} -@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} -.listingblock pre.highlightjs{padding:0} -.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} -.listingblock pre.prettyprint{border-width:0} -.listingblock>.content{position:relative} -.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} -.listingblock:hover code[data-lang]:before{display:block} -.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} -.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} -table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} -table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} -table.pyhltable td.code{padding-left:.75em;padding-right:0} -pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} -pre.pygments .lineno{display:inline-block;margin-right:.25em} -table.pyhltable .linenodiv{background:none!important;padding-right:0!important} -.quoteblock{margin:0 1em 1.25em 1.5em;display:table} -.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} -.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} -.quoteblock blockquote{margin:0;padding:0;border:0} -.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} -.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} -.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} -.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} -.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} -.quoteblock .quoteblock blockquote:before{display:none} -.verseblock{margin:0 1em 1.25em 1em} -.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} -.verseblock pre strong{font-weight:400} -.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} -.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} -.quoteblock .attribution br,.verseblock .attribution br{display:none} -.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} -.quoteblock.abstract{margin:0 0 1.25em 0;display:block} -.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} -.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} -table.tableblock{max-width:100%;border-collapse:separate} -table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} -table.spread{width:100%} -table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} -table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} -table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} -table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} -table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} -table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} -table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} -table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} -table.frame-all{border-width:1px} -table.frame-sides{border-width:0 1px} -table.frame-topbot{border-width:1px 0} -th.halign-left,td.halign-left{text-align:left} -th.halign-right,td.halign-right{text-align:right} -th.halign-center,td.halign-center{text-align:center} -th.valign-top,td.valign-top{vertical-align:top} -th.valign-bottom,td.valign-bottom{vertical-align:bottom} -th.valign-middle,td.valign-middle{vertical-align:middle} -table thead th,table tfoot th{font-weight:bold} -tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} -tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} -p.tableblock>code:only-child{background:none;padding:0} -p.tableblock{font-size:1em} -td>div.verse{white-space:pre} -ol{margin-left:1.75em} -ul li ol{margin-left:1.5em} -dl dd{margin-left:1.125em} -dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} -ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} -ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} -ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} -ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} -ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} -ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} -ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} -ul.inline>li>*{display:block} -.unstyled dl dt{font-weight:400;font-style:normal} -ol.arabic{list-style-type:decimal} -ol.decimal{list-style-type:decimal-leading-zero} -ol.loweralpha{list-style-type:lower-alpha} -ol.upperalpha{list-style-type:upper-alpha} -ol.lowerroman{list-style-type:lower-roman} -ol.upperroman{list-style-type:upper-roman} -ol.lowergreek{list-style-type:lower-greek} -.hdlist>table,.colist>table{border:0;background:none} -.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} -td.hdlist1{padding-right:.75em;font-weight:bold} -td.hdlist1,td.hdlist2{vertical-align:top} -.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} -.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} -.colist>table tr>td:last-of-type{padding:.25em 0} -.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} -.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} -.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} -.imageblock>.title{margin-bottom:0} -.imageblock.thumb,.imageblock.th{border-width:6px} -.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} -.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} -.image.left{margin-right:.625em} -.image.right{margin-left:.625em} -a.image{text-decoration:none} -span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} -span.footnote a,span.footnoteref a{text-decoration:none} -span.footnote a:active,span.footnoteref a:active{text-decoration:underline} -#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} -#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} -#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} -#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} -#footnotes .footnote:last-of-type{margin-bottom:0} -#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} -.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} -.gist .file-data>table td.line-data{width:99%} -div.unbreakable{page-break-inside:avoid} -.big{font-size:larger} -.small{font-size:smaller} -.underline{text-decoration:underline} -.overline{text-decoration:overline} -.line-through{text-decoration:line-through} -.aqua{color:#00bfbf} -.aqua-background{background-color:#00fafa} -.black{color:#000} -.black-background{background-color:#000} -.blue{color:#0000bf} -.blue-background{background-color:#0000fa} -.fuchsia{color:#bf00bf} -.fuchsia-background{background-color:#fa00fa} -.gray{color:#606060} -.gray-background{background-color:#7d7d7d} -.green{color:#006000} -.green-background{background-color:#007d00} -.lime{color:#00bf00} -.lime-background{background-color:#00fa00} -.maroon{color:#600000} -.maroon-background{background-color:#7d0000} -.navy{color:#000060} -.navy-background{background-color:#00007d} -.olive{color:#606000} -.olive-background{background-color:#7d7d00} -.purple{color:#600060} -.purple-background{background-color:#7d007d} -.red{color:#bf0000} -.red-background{background-color:#fa0000} -.silver{color:#909090} -.silver-background{background-color:#bcbcbc} -.teal{color:#006060} -.teal-background{background-color:#007d7d} -.white{color:#bfbfbf} -.white-background{background-color:#fafafa} -.yellow{color:#bfbf00} -.yellow-background{background-color:#fafa00} -span.icon>.fa{cursor:default} -.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} -.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} -.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} -.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} -.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} -.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} -.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} -.conum[data-value] *{color:#fff!important} -.conum[data-value]+b{display:none} -.conum[data-value]:after{content:attr(data-value)} -pre .conum[data-value]{position:relative;top:-.125em} -b.conum *{color:inherit!important} -.conum:not([data-value]):empty{display:none} -h1,h2{letter-spacing:-.01em} -dt,th.tableblock,td.content{text-rendering:optimizeLegibility} -p,td.content{letter-spacing:-.01em} -p strong,td.content strong{letter-spacing:-.005em} -p,blockquote,dt,td.content{font-size:1.0625rem} -p{margin-bottom:1.25rem} -.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} -.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} -.print-only{display:none!important} -@media print{@page{margin:1.25cm .75cm} -*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} -a{color:inherit!important;text-decoration:underline!important} -a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} -a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} -abbr[title]:after{content:" (" attr(title) ")"} -pre,blockquote,tr,img{page-break-inside:avoid} -thead{display:table-header-group} -img{max-width:100%!important} -p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} -h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} -#toc,.sidebarblock,.exampleblock>.content{background:none!important} -#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} -.sect1{padding-bottom:0!important} -.sect1+.sect1{border:0!important} -#header>h1:first-child{margin-top:1.25rem} -body.book #header{text-align:center} -body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} -body.book #header .details{border:0!important;display:block;padding:0!important} -body.book #header .details span:first-child{margin-left:0!important} -body.book #header .details br{display:block} -body.book #header .details br+span:before{content:none!important} -body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} -body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} -.listingblock code[data-lang]:before{display:block} -#footer{background:none!important;padding:0 .9375em} -#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} -.hide-on-print{display:none!important} -.print-only{display:block!important} -.hide-for-print{display:none!important} -.show-for-print{display:inherit!important}} -</style> -<style> -.listingblock .pygments .hll { background-color: #ffffcc } -.listingblock .pygments { background: #f0f0f0; } -.listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ -.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ -.listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ -.listingblock .pygments .tok-o { color: #666666 } /* Operator */ -.listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ -.listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ -.listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ -.listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ -.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ -.listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ -.listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ -.listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ -.listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ -.listingblock .pygments .tok-gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ -.listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ -.listingblock .pygments .tok-kc { color: #007020; font-weight: bold } /* Keyword.Constant */ -.listingblock .pygments .tok-kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ -.listingblock .pygments .tok-kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ -.listingblock .pygments .tok-kp { color: #007020 } /* Keyword.Pseudo */ -.listingblock .pygments .tok-kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ -.listingblock .pygments .tok-kt { color: #902000 } /* Keyword.Type */ -.listingblock .pygments .tok-m { color: #40a070 } /* Literal.Number */ -.listingblock .pygments .tok-s { color: #4070a0 } /* Literal.String */ -.listingblock .pygments .tok-na { color: #4070a0 } /* Name.Attribute */ -.listingblock .pygments .tok-nb { color: #007020 } /* Name.Builtin */ -.listingblock .pygments .tok-nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.listingblock .pygments .tok-no { color: #60add5 } /* Name.Constant */ -.listingblock .pygments .tok-nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.listingblock .pygments .tok-ni { color: #d55537; font-weight: bold } /* Name.Entity */ -.listingblock .pygments .tok-ne { color: #007020 } /* Name.Exception */ -.listingblock .pygments .tok-nf { color: #06287e } /* Name.Function */ -.listingblock .pygments .tok-nl { color: #002070; font-weight: bold } /* Name.Label */ -.listingblock .pygments .tok-nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.listingblock .pygments .tok-nt { color: #062873; font-weight: bold } /* Name.Tag */ -.listingblock .pygments .tok-nv { color: #bb60d5 } /* Name.Variable */ -.listingblock .pygments .tok-ow { color: #007020; font-weight: bold } /* Operator.Word */ -.listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ -.listingblock .pygments .tok-mb { color: #40a070 } /* Literal.Number.Bin */ -.listingblock .pygments .tok-mf { color: #40a070 } /* Literal.Number.Float */ -.listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ -.listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ -.listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ -.listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ -.listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ -.listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ -.listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.listingblock .pygments .tok-sh { color: #4070a0 } /* Literal.String.Heredoc */ -.listingblock .pygments .tok-si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.listingblock .pygments .tok-sx { color: #c65d09 } /* Literal.String.Other */ -.listingblock .pygments .tok-sr { color: #235388 } /* Literal.String.Regex */ -.listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ -.listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ -.listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ -.listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ -.listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ -.listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ -.listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ -</style> -</head> -<body class="article toc2 toc-left"> -<div id="header"> -<h1>Cats Documentation</h1> -<div class="details"> -<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.4.0</span> -</div> -<div id="toc" class="toc2"> -<div id="toctitle">Table of Contents</div> -<ul class="sectlevel1"> -<li><a href="#_introduction">1. Introduction</a></li> -<li><a href="#_rationale">2. Rationale</a></li> -<li><a href="#_project_maturity">3. Project Maturity</a></li> -<li><a href="#_install">4. Install</a> -<ul class="sectlevel2"> -<li><a href="#_leiningen">4.1. Leiningen</a></li> -<li><a href="#_get_the_code">4.2. Get the Code</a></li> -</ul> -</li> -<li><a href="#_user_guide">5. User Guide</a> -<ul class="sectlevel2"> -<li><a href="#_semigroup">5.1. Semigroup</a></li> -<li><a href="#_monoid">5.2. Monoid</a></li> -<li><a href="#_functor">5.3. Functor</a></li> -<li><a href="#_applicative">5.4. Applicative</a></li> -<li><a href="#_monad">5.5. Monad</a></li> -<li><a href="#_monad_transformers">5.6. Monad Transformers</a></li> -</ul> -</li> -<li><a href="#_types">6. Types</a> -<ul class="sectlevel2"> -<li><a href="#_maybe">6.1. Maybe</a></li> -<li><a href="#_either">6.2. Either</a></li> -<li><a href="#_exception">6.3. Exception</a></li> -<li><a href="#_state">6.4. State</a></li> -<li><a href="#_reader">6.5. Reader</a></li> -<li><a href="#_writer">6.6. Writer</a></li> -<li><a href="#_continuation">6.7. Continuation</a></li> -<li><a href="#_lazy_sequences">6.8. Lazy sequences</a></li> -<li><a href="#_vector">6.9. Vector</a></li> -<li><a href="#_set">6.10. Set</a></li> -<li><a href="#_map">6.11. Map</a></li> -<li><a href="#_validation">6.12. Validation</a></li> -<li><a href="#_complementary_libraries">6.13. Complementary libraries</a></li> -</ul> -</li> -<li><a href="#_faq">7. FAQ</a> -<ul class="sectlevel2"> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</a></li> -</ul> -</li> -<li><a href="#_how_to_contribute">8. How to Contribute?</a> -<ul class="sectlevel2"> -<li><a href="#_philosophy">8.1. Philosophy</a></li> -<li><a href="#_procedure">8.2. Procedure</a></li> -<li><a href="#_license">8.3. License</a></li> -</ul> -</li> -</ul> -</div> -</div> -<div id="content"> -<div id="preamble"> -<div class="sectionbody"> -<div class="paragraph"> -<p><span class="image"><img src="logo.png" alt="cats logo"></span></p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_introduction">1. Introduction</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>Category Theory and algebraic abstractions for Clojure.</p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_rationale">2. Rationale</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>The main motivations for writting this library are:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>The existing libraries do not have support for ClojureScript.</p> -</li> -<li> -<p>We do not intend to write a little haskell inside Clojure. We have adopted a -practical and clojure like approach, always with corectness in mind.</p> -</li> -<li> -<p>We do not like viral/copyleft like licenses and with difference with other libraries -cats is licensed under BSD (2 clauses) license.</p> -</li> -<li> -<p>We do not intend implement only monads. Other category theory and algebraic abstractions are also -first class in cats.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p><strong>Alternatives:</strong></p> -</div> -<div class="ulist"> -<ul> -<li> -<p><strong>algo.monads</strong>: This is the clojure official library for monads. Its approach for modeling -monads is slightly limited, only supports the monad abstraction and does not has support for -ClojureScript.</p> -</li> -<li> -<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on to be very practictical -without take care of corectness (as example, it extends clojure types with monadic abstractions -that not make sense). Also does not has support for ClojureScript.</p> -</li> -<li> -<p><strong>monads</strong>: is the most advanced monads library, supports also functors, applicatives and other -related abstractions. It lacks of good and readable documentation, fucused on correctness, has -haskell like sugar syntax (instead of clojure like syntax) and not has support for ClojureScript.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p>All listed alternatives are licensed with EPL or similar licenses.</p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_project_maturity">3. Project Maturity</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>Since <em>cats</em> is a young project, there can be some <a href="api/index.html#id">API</a> breakage.</p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_install">4. Install</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>This section covers installing <em>cats</em>.</p> -</div> -<div class="sect2"> -<h3 id="_leiningen">4.1. Leiningen</h3> -<div class="paragraph"> -<p>The simplest way to use <em>cats</em> in a Clojure project is by including -it as a dependency in your <strong><em>project.clj</em></strong>:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.4.0"</span><span class="tok-p">]</span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_get_the_code">4.2. Get the Code</h3> -<div class="paragraph"> -<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> -</div> -<div class="paragraph"> -<p>You can clone the public repository with this command:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> -</div> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_user_guide">5. User Guide</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>This section introduces almost all the category theory and algebraic abstractions that the <em>cats</em> library -supports.</p> -</div> -<div class="paragraph"> -<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all -the abstractions and it is very easy to understand. You can read more about it in the next -section of this documentation.</p> -</div> -<div class="sect2"> -<h3 id="_semigroup">5.1. Semigroup</h3> -<div class="paragraph"> -<p>A semigroup is an algebraic structure with an associative binary operation (<code>mappend</code>). Most of the builtin collections -form a semigroup because its associative binary operation is analogous to Clojure’s <code>into</code>.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [1 2 3 4 5 6]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple <em>Maybe</em> values.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => #<Just [1 2 3 4 5 6]></span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_monoid">5.2. Monoid</h3> -<div class="paragraph"> -<p>A Monoid is a Semigroup with an identity element (<code>mempty</code>). For the collection types the <code>mempty</code> -function is analogous to Clojure’s <code>empty</code>.</p> -</div> -<div class="paragraph"> -<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple <em>Maybe</em>, Nothing being -the identity element.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [1 2 3 4 5 6]></span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_functor">5.3. Functor</h3> -<div class="paragraph"> -<p>Let’s dive into the functor. The Functor represents some sort of "computational context", and the -abstraction consists of one unique function: <strong>fmap</strong>.</p> -</div> -<div class="listingblock"> -<div class="title">Signature of <strong>fmap</strong> function</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The higher-order function <strong>fmap</strong> takes a plain function as the first parameter and -value wrapped in a functor context as the second parameter. It extracts the inner value -applies the function to it, and returns the result wrapped in same type as the second -parameter.</p> -</div> -<div class="paragraph"> -<p>But, what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor -wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> -</div> -<div class="listingblock"> -<div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just 2></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>just</code> function is a constructor of Just type that is part of Maybe monad.</p> -</div> -<div class="paragraph"> -<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmap over <strong>just</strong> instance.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just 2></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absence of a value. -It is a safe substitute for <code>nil</code> and may represent failure.</p> -</div> -<div class="paragraph"> -<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> -instance:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmap over <strong>nothing</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Oh, awesome, instead of raising a <code>NullPointerException</code>, it just returns <strong>nothing</strong>. Another -advantage of using the functor abstraction, is that it always returns a result -of the same type as its second argument.</p> -</div> -<div class="paragraph"> -<p>Let’s see an example of applying fmap over a Clojure vector:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmav over <strong>vector</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [2 3 4]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The main difference compared to the previous example with Clojure’s map function, is that -map returns lazy seqs no matter what collection we pass to it:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>But why can we pass vectors to <code>fmap</code> function? Because some Clojure container types like vectors, -lists and sets, also implement the functor abstraction.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_applicative">5.4. Applicative</h3> -<div class="paragraph"> -<p>Let’s continue with applicative functors. The Applicative Functor represents -some sort of "computational context" like a plain Functor, but with ability to -execute a function wrapped in the same context.</p> -</div> -<div class="paragraph"> -<p>The Applicative Functor abstraction consists of two functions: <strong>fapply</strong> and -<strong>pure</strong>.</p> -</div> -<div class="listingblock"> -<div class="title">Signature of <strong>fapply</strong> function</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -the <strong>pure</strong> function will be explained later. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>The use case for Applicative Functors is much the same as plain Functors: safe -evaluation of some computation in a context.</p> -</div> -<div class="paragraph"> -<p>Let’s see an example to better understand the differences between functor and -applicative functor:</p> -</div> -<div class="paragraph"> -<p>Imagine you have some factory function that, depending on the language, returns a -greeter function, and you only support a few languages.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> - <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> - <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> - <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> - <span class="tok-nv">nil</span><span class="tok-p">))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Now, before using the resulting greeter you should always defensively check if returned -greeter is a valid function or is a nil value.</p> -</div> -<div class="paragraph"> -<p>Let’s convert this factory to use Maybe type:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> - <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> - <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> - <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> - <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As you can see, this version of the factory differs only slightly from the -original implementation. And this tiny change gives you a new superpower: you -can apply the returned greeter to any value without a defensive nil check:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just "Hola Alex"></span> - -<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just "Hello Alex"></span> - -<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Moreover, the applicative functor comes with <strong>pure</strong> function, and the main purpose of this function is -to put some value in side-effect-free context of the current type.</p> -</div> -<div class="paragraph"> -<p>Examples:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just 5></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>If you do not understand the purpose of the <strong>pure</strong> function, the next section -should clarify its purpose.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_monad">5.5. Monad</h3> -<div class="paragraph"> -<p>Monads are the most discussed programming concept to come from category theory. Like functors and -applicatives, monads deal with data in contexts.</p> -</div> -<div class="paragraph"> -<p>Additionaly, monads can also transform contexts by unwrapping data, applying functions to it and -putting new values in a completely different context.</p> -</div> -<div class="paragraph"> -<p>The monad abstraction consists of two functions: <strong>bind</strong> and <strong>return</strong></p> -</div> -<div class="listingblock"> -<div class="title">Bind function signature.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As you can see, bind works much like a Functor but with inverted arguments. The main difference is -that in a monad, the function is a responsible for wrapping a returned value in a context.</p> -</div> -<div class="listingblock"> -<div class="title">Example usage of the bind higher-order function.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> -<span class="tok-c1">;; => #<Just 2></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>One of the key features of the bind function is that any computation executed within the context of -bind (monad) knows the context type implicitly. With this, if you apply some computation over some -monadic value and you want to return the result in the same container context but don’t know -what that container is, you can use <code>return</code> or <code>pure</code> functions:</p> -</div> -<div class="listingblock"> -<div class="title">Usage of return function in bind context.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> -<span class="tok-c1">;; => #<Just 2></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context -value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> -</div> -<div class="paragraph"> -<p>We now can compose any number of computations using monad <strong>bind</strong> -functions. But observe what happens when the number of computations increases:</p> -</div> -<div class="listingblock"> -<div class="title">Composability example of bind function.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>This can quickly lead to callback hell. To solve this, <em>cats</em> comes with a powerful -macro: <strong>mlet</strong></p> -</div> -<div class="listingblock"> -<div class="title">Previous example but using <strong>mlet</strong> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -If you are coming from Haskell, mlet represents the <strong>do-syntax</strong>. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>If you want to use regular (non-monadic) let bindings inside an <code>mlet</code> block, you can do so using -<code>:let</code> and a binding vector inside the mlet bindings:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_monad_transformers">5.6. Monad Transformers</h3> -<div class="sect3"> -<h4 id="_motivation">5.6.1. Motivation</h4> -<div class="paragraph"> -<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, -we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]]))</span> - -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> - <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> - -<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> -<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> -<span class="tok-c1">; contain a value of any type.</span> -<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> -<span class="tok-c1">;;=> [#<Just 2> #<Just 3>]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>However, monads don’t compose as nicely as functors do. We have to actually implement -the composition ourselves.</p> -</div> -<div class="paragraph"> -<p>In some circumstances we would like combine the effects of two monads into another one. We call the -resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A -monad transformer is itself a monad.</p> -</div> -</div> -<div class="sect3"> -<h4 id="_using_monad_transformers">5.6.2. Using monad transformers</h4> -<div class="paragraph"> -<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer -using State as the base monad since we want the resulting type to be a stateful computation -that may fail: <code>s → Maybe (a, s)</code>.</p> -</div> -<div class="paragraph"> -<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with -any other monad. The transformer functions take a Monad as their argument and they -return a reified MonadTrans:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> -<span class="tok-c1">;; => #<Just #<Pair [42 {}]>></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful -function that yields a Maybe containing a pair (value, next state).</p> -</div> -<div class="paragraph"> -<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. -When working with monad transformers, we have to be explicit about what monad we are using to implement -the binding policy since there is no way to distinguish values from a transformer type from those of -a regular monad.</p> -</div> -<div class="paragraph"> -<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> -</div> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_types">6. Types</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_maybe">6.1. Maybe</h3> -<div class="paragraph"> -<p>This is one of the two most used monad types (also known as Optional in other programming -languages).</p> -</div> -<div class="paragraph"> -<p>Maybe monad represents encapsulation of an optional value; e.g. it is used as the return type -of functions which may or may not return a meaningful value when they are applied. It consists -of either an empty constructor (called None or Nothing), or a constructor -encapsulating the original data type A (written Just A or Some A).</p> -</div> -<div class="paragraph"> -<p><em>cats</em>, implements two types:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>Just</code> that represents just a value in a context.</p> -</li> -<li> -<p><code>Nothing</code> that represents the abscense of value.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Example creating instances of <code>Just</code> and <code>Nothing</code> types</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just 1></span> - -<span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>In the same ns, it there other usefull functions for work with maybe monad types. See the api -documentation for see a full list of them. But here we will exaplain a little relevant subset -of they.</p> -</div> -<div class="paragraph"> -<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to -extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> -</div> -<div class="paragraph"> -<p>The Just or Nothing instances as we said previously, acts like a wrappers and in some circumstances -you will want extract the plain value from them. For it, cats offers the <code>from-maybe</code> function.</p> -</div> -<div class="listingblock"> -<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => 1</span> - -<span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => nil</span> - -<span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>from-maybe</code> function is a specialized version more generic one: <code>cats.core/extract</code>. The generic -version is a polymorphic function and will work also with different types of different monads.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_either">6.2. Either</h3> -<div class="paragraph"> -<p>Either is another type that represents a result of computation, but (in contrast with maybe) -it can return some data with a failed computation result.</p> -</div> -<div class="paragraph"> -<p>In <em>cats</em> it has two constructors:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>(left v)</code>: represents a failure.</p> -</li> -<li> -<p><code>(right v)</code>: represents a successful result.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>Either</strong> constructors.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Right [:valid-value :right]></span> - -<span class="tok-p">(</span><span class="tok-nb">left </span><span class="tok-s">"Error message"</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Either [Error message :left]></span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Either is also (like Maybe) Functor, Applicative Functor and Monad. -</td> -</tr> -</table> -</div> -</div> -<div class="sect2"> -<h3 id="_exception">6.3. Exception</h3> -<div class="paragraph"> -<p>Also known as Try monad, popularized by Scala.</p> -</div> -<div class="paragraph"> -<p>It represents a computation that may either result in an exception or return a successfully computed -value. Is very similar to Either monad, but is semantically different.</p> -</div> -<div class="paragraph"> -<p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of -Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an -instance of Throwable (or Error in cljs).</p> -</div> -<div class="paragraph"> -<p>The most common use case of this monad is for wrap third party libraries that uses standard Exception -based error handling. In normal circumstances you should use Either instead.</p> -</div> -<div class="paragraph"> -<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error handling with -heap-based error handling. Instead of having an exception thrown and having to deal with it immediately -in the same thread, it disconnects the error handling and recovery.</p> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>try-on</strong> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Success [1]></span> - -<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Failure [#<NullPointerException java.lang.NullPointerException>]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that returns a default value if a -computation fails, and <code>try-or-recover</code> that lets you handle the return value when executing a -function with the exception as first parameter.</p> -</div> -<div class="listingblock"> -<div class="title">Usage example of <code>try-or-else</code> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Success [2]></span></code></pre> -</div> -</div> -<div class="listingblock"> -<div class="title">Usage example of <code>try-or-recover</code> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">cond</span> - <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> - <span class="tok-ss">:else</span> <span class="tok-mi">100</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => #<Success [0]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref -interface, which facilitates libraries developing using monadic composition without forcing a user of -that library to use or understand monads.</p> -</div> -<div class="paragraph"> -<p>That is because when you will dereference the failure instance, it will reraise the containing -exception.</p> -</div> -<div class="listingblock"> -<div class="title">Example dereferencing a failure instance</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">f</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)))</span> - -<span class="tok-o">@</span><span class="tok-nv">f</span> -<span class="tok-c1">;; => NullPointerException clojure.lang.Numbers.ops (Numbers.java:961)</span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_state">6.4. State</h3> -<div class="paragraph"> -<p>State monad in one of the special cases of monads most used in Haskell. It has different -purposes including: lazy computation, composition, and maintaining state without explicit state.</p> -</div> -<div class="paragraph"> -<p>The de-facto monadic type of the state monad is a plain function. Function represents a computation -as is (without executing it). Obviously, a function should have some special characteristics to work -in monad state composition.</p> -</div> -<div class="listingblock"> -<div class="title">Valid function for valid state monad</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> - <span class="tok-s">"Takes state as argument and return a vector</span> -<span class="tok-s"> with first argument with procesed value and</span> -<span class="tok-s"> second argument the transformed new state."</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> - <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> - <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>You just saw an example of the low-level primitive state monad. For basic usage -you do not need to build your own functions, just use some helpers that <em>cats</em> provides.</p> -</div> -<div class="paragraph"> -<p>Let’s look at one example before explaining the details:</p> -</div> -<div class="listingblock"> -<div class="title">Lazy composition of computations</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">st</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">st/get-state</span><span class="tok-p">)</span> - <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">st/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> -<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>At the moment of evaluation in the previous expression, nothing of that we have defined -is executed. But instead of returning the unadorned final value of the computation, -a strange/unknown object is returned of type <strong>State</strong>.</p> -</div> -<div class="paragraph"> -<p>The State type is simply a wrapper for Clojure functions, nothing more.</p> -</div> -<div class="paragraph"> -<p>Now, it’s time to execute the composed computation. For this we can use one of the following -functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>run-state</code> function executes the composed computation and returns both the value and the -result state.</p> -</li> -<li> -<p><code>eval-state</code> function executes the composed computation and returns the resulting value -discarding the state.</p> -</li> -<li> -<p><code>exec-state</code> function executes the composed computation and return only the resulting -state, ignoring the resulting value.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Example of resuls of using the previosly listed functions</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> 1</span> - -<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> (2 3)</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>run-state</code> function returns an instance of Pair type. The Pair type acts like any other seq in -clojure with the exception that it only can contain two values.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_reader">6.5. Reader</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_writer">6.6. Writer</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_continuation">6.7. Continuation</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_lazy_sequences">6.8. Lazy sequences</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_vector">6.9. Vector</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_set">6.10. Set</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_map">6.11. Map</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_validation">6.12. Validation</h3> -<div class="paragraph"> -<p>The validation type is similar to Either or Exception types but it doesn’t implement a Monad instance. It -has two constructors: <code>ok</code> and <code>fail</code>, representing success and failure respectively.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;;=> #<Ok 42></span> - -<span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">[])</span> -<span class="tok-c1">;;=> #<Fail []></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>It implements the Applicative protocol, and its intended usage is as an Applicative. Applying Validation -values together errs on the side of the failure, and applying failures together aggregates their values -using the Semigroup’s <code>mappend</code> function.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-s">"OH NOES"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Fail "OH NOES"></span> - -<span class="tok-c1">;; Note that `<*>` is a variadic fapply</span> -<span class="tok-p">(</span><span class="tok-nf">m/<*></span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:foo</span> <span class="tok-s">"bar"</span><span class="tok-p">})</span> - <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:baz</span> <span class="tok-s">"fubar"</span><span class="tok-p">})</span> - <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">99</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Fail {:baz "fubar", :foo "bar"}></span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_complementary_libraries">6.13. Complementary libraries</h3> -<div class="paragraph"> -<p>Some monads are defined as separated package for avoiding additional -and unnecesary dependencies to cats. Also, there are some libraries -that build higher-level abstractions on top of what cats offers.</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Channel monad: <a href="https://github.com/funcool/cats-channel" class="bare">https://github.com/funcool/cats-channel</a></p> -</li> -<li> -<p>Higher-level validation: <a href="https://github.com/funcool/vale" class="bare">https://github.com/funcool/vale</a></p> -</li> -</ul> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_faq">7. FAQ</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</h3> -<div class="paragraph"> -<p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types -that don’t act like containers. For example, Clojure keywords are values but can not be containers so -they should not extend any of the previously explained protocols.</p> -</div> -<table class="tableblock frame-all grid-all spread"> -<caption class="title">Table 1. Summary of Clojure types and implemented protocols</caption> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top">Name</th> -<th class="tableblock halign-left valign-top">Implemented protocols</th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">sequence</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">hash-map</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid</p></td> -</tr> -</tbody> -</table> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_how_to_contribute">8. How to Contribute?</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_philosophy">8.1. Philosophy</h3> -<div class="paragraph"> -<p>Five most important rules:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Beautiful is better than ugly.</p> -</li> -<li> -<p>Explicit is better than implicit.</p> -</li> -<li> -<p>Simple is better than complex.</p> -</li> -<li> -<p>Complex is better than complicated.</p> -</li> -<li> -<p>Readability counts.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p>All contributions to <em>cats</em> should keep these important rules in mind.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_procedure">8.2. Procedure</h3> -<div class="paragraph"> -<p><em>cats</em> does not have many restrictions for contributions. Just follow these -steps depending on the situation:</p> -</div> -<div class="paragraph"> -<p><strong>Bugfix</strong>:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Fork the GitHub repo.</p> -</li> -<li> -<p>Fix a bug/typo on a new branch.</p> -</li> -<li> -<p>Make a pull-request to master.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p><strong>New feature</strong>:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Open new issue with the new feature proposal.</p> -</li> -<li> -<p>If it is accepted, follow the same steps as "bugfix".</p> -</li> -</ul> -</div> -</div> -<div class="sect2"> -<h3 id="_license">8.3. License</h3> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> -Copyright (c) 2014-2015 Alejandro Gómez <alejandro@dialelo.com> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</code></pre> -</div> -</div> -</div> -</div> -</div> -</div> -<div id="footer"> -<div id="footer-text"> -Last updated 2015-04-03 19:54:06 CEST -</div> -</div> -</body> -</html> \ No newline at end of file diff --git a/devel/logo.png b/devel/logo.png deleted file mode 100644 index 9f1a8f949faea6d5a7768f1aa02b68a648f87979..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5208 zcmV-e6sPNnP)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00004b3#c}2nYxW zd<bNS00009a7bBm000}W000}W0bUxB8~^|S8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H16V*vXK~#90?VWj?71fo;zlT+2iyH`tw8j{hpg0;gL{MVJjJufV zd_Y4qL1UuHn9R6FjWL=;qZ311Mx&z>HIul6pdUnn8r0~3F}NTqk!Euth=PcUG~D^) z+-Kh|>b+N0_tvXwyMLe0`E>QGyWdlHIrrRi#27;-Ixe~tU4Tv$i%tgU;OJz44vtO+ z=-}vNfDVp!&j2FQwZObZMA~&5w#&kcNEZ>AC?b=Aw?$-yh}<tCdp0Ql5h5}TcpF$Q zB6o?%*hb_X9LAV-ML=I*3SeUBBj947YfgFh1g-(rSIPfIpnK76l&Vfe7a(N^GyyMG zX?&L+2eu2G_h*4Q3G$u^Y*BPuec~7Z*aY}nf)1$A+rR|h(E#WUd=q#tMcxkrQgoYr z(iq^zn1-GLoC|!}etB`7F(3F^+M(Gp+_!<nRnmO`7z<noOpAGcLD6mYiD3X>T%>V7 z1Wt|#_Z7Pii0iO-fZthW*b&$?61NwyGjKXE8CYE<oz=h>WAgqMu+9nB0*orU?b<y9 z0Gk6VBb{(ejqu-1F;uSv769+2h%>%M-V-8W7XdwsZo~G@09Qok*9389r0CEzba$P6 z1$Z(N=etF>VJ#}P96&?{0B1QrwE+KCCr(#%xX%MCL`15+G|C0vK|8*J^F*X~PUZ1O z(HvOki@KJ!U(>Z!!gU1>0Db~2C7-XqLJNRPfW4@)(g$vj#JRBOwyfI5MHiq(=WmNH z_S}Zt%Xz;Qx;VT8Sdnw5SEDz8TY=+&eoooOM8d5EHZQtO<EUHRA)+`;L?v%7Mu^Br z;5c9e#f!4HK^J}#fEE#X1h^O2G7|2!Xhabif{t3ffj+=yz%#(3#+VQDD{=%yb6}OP zzZ>v6#eCJFX(2E;GO}F<tgRA$4RAloR9$j!>!Lfm3IiNhf{qJ8%Ye@~_4*+jPiwVk z7BIXcGQdM6=)4d##;H>p`GiX?z?I~6z*Tf-$8`RVz=jfZo-e)R)agj7pCBfs*d35B z6}^ax!$ee|(%x}1fQWQM&oO-4`b-fytA4O_5X+&ZfQa-&_wid5T^3KQLl=I_MdUc( zo<QktK*iuw0;N~F5nwFszw-eeH^wZt&!+`Uw+nEWi0l|L!7}0Wq6-iRA2`qZ1x~vc zaDJ%7O2YsmvMVq$L)1T`+r}Zl0ALV$jz1?{=>T{P_$tsJ6##7qoCN$eCagQJ=F!IE ztsu!CMX&mum2y<>pM*|u;`czMYTcdR&d!i#l-2<!*2(9bNSr@9@7@nkhTL`qr5OQ$ z6EeivTtr5R$Q`K4)@opxh)fcZt&K5P<2MJl0ADf2{8mJoMC2Cqq;WOyu87<uBKx9> zsxI7iUF?y6Eqq->`g^BR^p|hHl3fY^h0Fs6qn(lUuxOrBzSmO3TZ29PL65WZ7y%4$ z&L?FA7@b3!I|DCZwRE$lAtEz?+34CLDK-O6wa>SrBSs!L&^v{qzkd6b{Eqy-lA@>? zE4~FT$SIGveA~Vhf*=uDhOVv~jb*@ebY4FIRq_al<Bc)*0Eoz~=m}qF>|~6YpE-63 zzWy}x|C_)K=+-a9aq)gmIl2IIJ<?hXJPiB_WhjHLJ$AF{cSG+BgdPPp(vEI#Yk=KT zgdKn?Tbyf*8HAp#p9s8^G4Invq@UIEI|^Mlq`@3idby1;W;@_gU?}h@`+f`HArWaZ z#<bY54`wWDHSFXSy96UZMTs)Y7uO6d<Z#uLHmIh`-F1qn0jWGce2<32yN$vrGTw z)Ba^p39B{tuLYh(_3PiVv>N@wwz9M%dUqh}HSycf!<y63YhY>6f^H8NIOSUf^mEF$ z127DDQbZ;gW9|k{5s@XpMH$QN!fWkRb_Q4myn=o~)fiv{x<$)!h_n>A3K)o<L;N~r z{I_iR{!VoUXtC*U1N>e@{@oaJl`-aG5m^dcPj==7-^FtYrhq>Zeqoe^K0sIgBY~$; z9fT_zl=oRq{SPPI#nULg;?@2oV1TDmR(LLOIdBFlKAxVT(Wat9a}zqf7~lu!mv~;v z4!O^k<6FSb&=Da?yopX5jG?-cXgzwly)!_y+qY4A2{;s8^&SLVhTi;5(^yMT9sa(+ zDQtY_@E-J3aS-sE6zRTz-V#0lU6UMvPFuC&YyiIMw8M#HQ-yo3-7)|=>{h$Yn+Ls# z8kne;XEQplx8z)&^|U={{9cAMX8H6%p>hDDwZ6T9Sq=bpq5f*W3HUUAi?bvUVE@Y9 zL1WC%QDIUVto12Cp$uRJFjt`p9d8v`mI5#n*ax^1cveIz2Ue${cL$Qf?-o%3!~P(k zzkU8RI^1rJ?&W_$W2b~7=w;w&TmL3>t80Keoi;i*MSAzQn>7F`YF!EpwErJ(EAgE3 z+fZN<x=ky(vqI8xbf?hGVg3b?Fr)0dZm0k(NxC&{7L<kofZ@PDfaT6_KXNLv0NB-e zw+*_js%EOCz0e2fwe`ME-G-qzi=$y5aKaptF#S79&j7%lw4RVX=KOwFq%!XkG5>-d zs9b_t{VKXM(@--i>Kz=Z&;B*)vH|#<6ZX*r`CMOW2CyBt&?)fk&b$As(g>FjF}{Fa zq5co*@2`ub4^gK6LbUw04u?`-$n@V%_>l?n{6T3M0NrIwjTHEY&ih&?d4B-<R7rO@ zdeb)PJefB=i|YPWH4q7$OfqTTN3^|8Uhkspsbyw>i(?8r!TF-=HO4$(WSu;=N9_j9 z#Qy?jQffg(*q7p1EvZtzT}f}W>Pjd60d>NDsgw)={BxBK8D-z^k)lEV2UWVLm*>{N zc=W8`Zgh7MLN9+csu+4Bx^t;(?gbS$|D3kA1C!D!+M1mCYmKmb`1DgQI)Ngx9cu0* zYAOZPhVK#)ITkgik`(WvYlB}J)vife7C|+Kc5<jc`W3gJ9Ta_DhYF_Vq1U{Zq$npM zauT|O*(OcA2+lFa{LH2|5oNwOY-NmDkvW$fzWg4jWs5j&{RnIJgluwe13V8LOHKw8 zJnFp#s@?QL#(G8RHK2!0yEpO1EEjl}JBNn2u12NiJK-jIHqcUZjWIZM9a7X)(4*YD zNN4&bDSge!>xP*3x0Q+kfG^dl(Bn?ns0<)0twX1hL$Ok}6y+TP9EO!bCXCY^U6@@A zyqZI&yEK<p8xDKMy#IP>7yz}dU9Ul=JK-ni&|vQaPoQTC<5AIb+<ts?Oj+jvpN|RK z1Kp2bh$^3~$+^>`bc9ou=+yezGBLoV2`b~>n*CFQ8gLbGiIeXHs;|sH0FHFRUQT|u zdy~>kr#z=Rzb^~XZ$XZOMdUN6l&&6J!wH*($U6c0qMASz+r!sVT^V*0;3g5N-1c1t zY?^xsYh$Fnfei3lbTJ6(6~!B&^Z|aw##TM!;GSLg3Y2#e%&>pQp#rE{7=Z5e0UpV% zMCtH70AtJ=R8<YsV1+ll89+o%Ko?+1P{atZ&=|AOJ`YP6rxNaY^x&pw94#W7+vkev z`pggsdoh5B^Z~9;5yfSIMvVaO7oSvMQVG|M#xZIw^g!L>V2pVNxX=FehVKY)7U}NI z7r_8qipci%c~-(Wm2jU!*9B$3IOjQ-kHX9hAR?R4)|o@1XwLJ7ta)cZ#ZuS3sOPa- zcm&<<x$(+?kygZxv0H*5@Ywc!lk{7fTb%ew{Qrfbxme#l=vUobCESa^P#dlfZS@$+ zK<9?qwtL9|P<81nQn0B`8hQEksYX9>^6rgZEO`P|Q=5t24C?8Gi4(mRP0yEw0ltv2 z0&|=+?r3o1wV+d0O^1#sbDvLn4OV*{|ArC-9i1`WK<D|zjA>*=S5!niqnfEzYpn8d z;K!8LVD-5AL6RerK7fcULM>%x!BAt&Vi7qAHT6;ymZCZf^U*Vdf1)jemK96UHVm_f z&M^EB$8QKb*`~7z*>A*lbQ)3Q6mW2cI4(v57<G&^+cT|>iZP)Q%EABxJo9uJ==Yv! zbyOS@DxoY4;A_vnNkm52=Q~g}u|{J(s&X|8Ra<`=y{Xek;gk>d6Ok~dlo{3lArv`o zb<(>#Kzd2&CE%y1zrk32LR8!55OlZD+@Nx0r7>yyE{Gfe_)CDozXxn$)BBg48)`0a zc!qikYPBPJfwL_1<DwYg=|B}Y+@{x+e4IpnfQqZTq6bf3L<K>+rL1oc^tyHy{r)`Z z$)XtG)<6}w(MdDvY}uDy$LjZ?%9PEK_j5_9O^i+rMfoU>qjgldI+r&CoEfMBuhA-q zni#NQUaE91x?qhOf~wHNq;$=S-sxWysGK1v_0$%nEW3apiU_D4LB%@v6M@ov2UY5< zIBUKL-RazfP64|D-$w;d2cxcD62lntDr!@BO`!7n!hbuMVFc(!xJ#JF*)#_QNNXK% zNTjTbfWu<yFb3W7tp+yD&<4j)j>DqAHGB%N4G_w@=iWBGApz2w6vL?VYt&(yjdyIu zHn_6{46qhY593)GV4px0s2GbH;hD}VVCzU3ds5@#1o{;l9OFzW+h7OEah9>I4+CU6 z4mQTj!r#8%Tw}~X?6dD&c9m)M)CqtwX00*i<r;COpeJibSoOA4FvcuE*A_*i$tSXp zQs{S3m8q;a13q@He4<A>p!Ne&!5Fh1?Z7^$ErTp*q>;;NX!41inE{M3D^W|=D>FpD z-568RYd;%ZooB^!rd97hEf(3oU(OhRHoBcH5=~yQy;qSs7gn<e5J&f5tzV!v0evr9 zW)g{_SH>z5$W=J{fGN|dbsfGDbaTVk050rYI0Cq)PSCZ$nZ}s0#+X(1w@LV4yqK3U z-j8V20P2g%2^yJyC^UJ+_Wb&zrrdT%1ugfZQ^N}Td>*ii6Rr>8#J>k;DEFRhYzaKm zmxN9qMUDV}_v%AW2G|}oW424oyDm`%vA^#}Si=fCr7Uw7HnvZ=0-X+OY7AFNFNrO` zJjqKI;5!8fdNK4l5xH7KK31wU#%wT^VM3&<hzu8z%g|e`J9y^nVtvZ+6Hz%v1^<hB z@fwIKhUT4rX!Ic6^}M$5907J@V~$*kDvewOT!CJ-^6`mNj}A&v-u|?jtTpHYbO@@a zXn>0|w87XM>z0)E&)SE+Uc=%>kinLY@=QA^2B!#n6|GJk0j@A=vhEFZCvXI6fiw+# zOu>ah=6>{@0?OcdG?C{_5g84f<owi(G6Y8L4n73zB_e4U3Um}K8kwh|PXYrRUN3-% zbVv8=F3vWpnqI*J=$htVQ|8~Ok**dxGz07{BJ~zQ-$#7~RWRKc^M^>7spt{!_@o(& z$nJz)&}K!4W`K(FX8cQ$CiLcS1uf_~MjIGCn0gA>Lqra&lGffL;*JnO@9B9UvFY56 z;JFLfh2mGh1~oh1w@MkOM8aNEqdwoTVV)&MbsXK@TwtFE(s-MJ)hP3kurCAjpgc~V zu81k$F_AFKaIA30gzrnMUBIcd>K67v9Zi1h=MOdBTy&icj{W6^Gk|S~IVETWgQ|h= z<&>)z8+#?K>s$fd8C1e=KyMFM99X@Eo?RS7dDO&T_3FO>3~*Zs8lgf<uzm$lbM5ZC z*(CT<&^`5oF=?+s?IJW$+tW#-X@*b#g>WA~2X%*125bx5CnATVf*n_=bFWEor{1Vc z;4l#x1{?|Oi#mk91vMx0F#h)=Lt>#<>;NOc!4&@$MCk=!d*8Z6>bV>FTL;fVrx!g1 zY*B(nh@<6r`qOdhcp~u*8_GaC6v_a$fs(p_FM|F=9mh^J>NN_L4HR96YUH&5G$za% z0Ca&h#3TNCbS?21`laoR-Wu-hUo^%5vqj|3z<sEh)v7*#tO2QGQHR!{3`MR))#l!` z)C)KewMpzFOnb<;U_qQlWpDsh3ooFCBYuNw?u<oO-=C@#DJ2%61|i-=kB7HJPxS_& z3&{{z1>B4ZqMkrKnw^eLCy5TQ65tqP%w(?=0!;zki1&r-L+@aH=AZ(a%V{4DrPreR zkz3lb_aYz16AMY{A}6;sfUW4|IW_1sTFti(LFEo*xR)14Q3u!ulHbnZ+d=v*AOmbi zeqZQnU|%P%qbSF<ESLU*b3F|`rq08Ym_g+csV}wW$^f>~m*v>Ni?PFM37Oy-tjQZ& zwtaIh+Xcb;EHDG~LUjW3s`!IA;@pxj!8<rYCv-u%B**-k31Ar{7Y48mFfQi?KPQsk z`2{n;*hqP<&oQqS;DDh06`BETBm6qYMp%NQzmIMYR~OXzb0YQbn{!z%3f@;aF+fl9 zm7tA`<oAn$7+_qa9H-=%*JI@1FF6;LE@RAERFd{)9_gc!Iv4**<1c8ujb18ou}@sU z0C*8N!RVFtpvX<9&lvMMDobz9A^A29ZH#HA)z43(Fx_nI#y*sU&&5;di1&I9X$LzC zh=noc6%pAVy&$@Gz@+2O^{+!moPOxK!2R2gFm*Mk1nx!Dcw~}t`CuBl$jr?uS&*}U zx|xXdLM3=U?#`B=#;GO)j~ZjvWhg@&bM!_9HfyR7=t$WGc*_{`evLeOqK8jMqsk;% z9Z;-C4RW55ww`Ix5C-@-Gj+-G4OEGw)=5|kdRuo9s(~}v7*o&PTd5!-0(>52hS8{` zbRcTFHV%~&(HX!Ec3R6F4P}5f8LNZlp{U@bqGGiK6(qf3Lb*gK5k#abdg3?)J#}nB zucog+UEIFc@G=#}0G%iY%5bx%69uA^0XjH38K8rslL0z7IvJpYqmuzTIQ}1U+}%<$ S1(h=Z0000<MNUMnLSTX;hnoig diff --git a/index.html b/index.html deleted file mode 100644 index 282aa22..0000000 --- a/index.html +++ /dev/null @@ -1,1570 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<meta charset="UTF-8"> -<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.2"> -<meta name="author" content="Andrey Antukh & Alejandro Gómez"> -<title>Cats Documentation</title> -<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400"> -<style> -/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ -/* Remove the comments around the @import statement below when using this as a custom stylesheet */ -/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/ -article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} -audio,canvas,video{display:inline-block} -audio:not([controls]){display:none;height:0} -[hidden],template{display:none} -script{display:none!important} -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} -body{margin:0} -a{background:transparent} -a:focus{outline:thin dotted} -a:active,a:hover{outline:0} -h1{font-size:2em;margin:.67em 0} -abbr[title]{border-bottom:1px dotted} -b,strong{font-weight:bold} -dfn{font-style:italic} -hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} -mark{background:#ff0;color:#000} -code,kbd,pre,samp{font-family:monospace;font-size:1em} -pre{white-space:pre-wrap} -q{quotes:"\201C" "\201D" "\2018" "\2019"} -small{font-size:80%} -sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} -sup{top:-.5em} -sub{bottom:-.25em} -img{border:0} -svg:not(:root){overflow:hidden} -figure{margin:0} -fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} -legend{border:0;padding:0} -button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} -button,input{line-height:normal} -button,select{text-transform:none} -button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} -button[disabled],html input[disabled]{cursor:default} -input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} -input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} -button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} -textarea{overflow:auto;vertical-align:top} -table{border-collapse:collapse;border-spacing:0} -*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} -html,body{font-size:100%} -body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} -a:hover{cursor:pointer} -img,object,embed{max-width:100%;height:auto} -object,embed{height:100%} -img{-ms-interpolation-mode:bicubic} -#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} -.left{float:left!important} -.right{float:right!important} -.text-left{text-align:left!important} -.text-right{text-align:right!important} -.text-center{text-align:center!important} -.text-justify{text-align:justify!important} -.hide{display:none} -.antialiased,body{-webkit-font-smoothing:antialiased} -img{display:inline-block;vertical-align:middle} -textarea{height:auto;min-height:50px} -select{width:100%} -p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} -.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} -div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} -a{color:#2156a5;text-decoration:underline;line-height:inherit} -a:hover,a:focus{color:#1d4b8f} -a img{border:none} -p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} -p aside{font-size:.875em;line-height:1.35;font-style:italic} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} -h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} -h1{font-size:2.125em} -h2{font-size:1.6875em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} -h4,h5{font-size:1.125em} -h6{font-size:1em} -hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} -em,i{font-style:italic;line-height:inherit} -strong,b{font-weight:bold;line-height:inherit} -small{font-size:60%;line-height:inherit} -code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} -ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} -ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} -ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} -ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} -ul.square{list-style-type:square} -ul.circle{list-style-type:circle} -ul.disc{list-style-type:disc} -ul.no-bullet{list-style:none} -ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} -dl dt{margin-bottom:.3125em;font-weight:bold} -dl dd{margin-bottom:1.25em} -abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} -abbr{text-transform:none} -blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} -blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} -blockquote cite:before{content:"\2014 \0020"} -blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} -blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} -@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} -h1{font-size:2.75em} -h2{font-size:2.3125em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} -h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} -table thead,table tfoot{background:#f7f8f7;font-weight:bold} -table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} -table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} -table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} -table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} -h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} -.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} -.clearfix:after,.float-group:after{clear:both} -*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} -pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} -.keyseq{color:rgba(51,51,51,.8)} -kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} -.keyseq kbd:first-child{margin-left:0} -.keyseq kbd:last-child{margin-right:0} -.menuseq,.menu{color:rgba(0,0,0,.8)} -b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} -b.button:before{content:"[";padding:0 3px 0 2px} -b.button:after{content:"]";padding:0 2px 0 3px} -p a>code:hover{color:rgba(0,0,0,.9)} -#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} -#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} -#header:after,#content:after,#footnotes:after,#footer:after{clear:both} -#content{margin-top:1.25em} -#content:before{content:none} -#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} -#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} -#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} -#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} -#header .details span:first-child{margin-left:-.125em} -#header .details span.email a{color:rgba(0,0,0,.85)} -#header .details br{display:none} -#header .details br+span:before{content:"\00a0\2013\00a0"} -#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} -#header .details br+span#revremark:before{content:"\00a0|\00a0"} -#header #revnumber{text-transform:capitalize} -#header #revnumber:after{content:"\00a0"} -#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} -#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} -#toc>ul{margin-left:.125em} -#toc ul.sectlevel0>li>a{font-style:italic} -#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} -#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} -#toc a{text-decoration:none} -#toc a:active{text-decoration:underline} -#toctitle{color:#7a2518;font-size:1.2em} -@media only screen and (min-width:768px){#toctitle{font-size:1.375em} -body.toc2{padding-left:15em;padding-right:0} -#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} -#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} -#toc.toc2>ul{font-size:.9em;margin-bottom:0} -#toc.toc2 ul ul{margin-left:0;padding-left:1em} -#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} -body.toc2.toc-right{padding-left:0;padding-right:15em} -body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} -#toc.toc2{width:20em} -#toc.toc2 #toctitle{font-size:1.375em} -#toc.toc2>ul{font-size:.95em} -#toc.toc2 ul ul{padding-left:1.25em} -body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -#content #toc>:first-child{margin-top:0} -#content #toc>:last-child{margin-bottom:0} -#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} -#footer-text{color:rgba(255,255,255,.8);line-height:1.44} -.sect1{padding-bottom:.625em} -@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} -#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} -#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} -#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} -#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} -#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} -.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} -.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} -table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} -.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} -table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} -.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} -.admonitionblock>table td.icon{text-align:center;width:80px} -.admonitionblock>table td.icon img{max-width:none} -.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} -.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} -.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} -.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} -.exampleblock>.content>:first-child{margin-top:0} -.exampleblock>.content>:last-child{margin-bottom:0} -.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -.sidebarblock>:first-child{margin-top:0} -.sidebarblock>:last-child{margin-bottom:0} -.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} -.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} -.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} -.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} -.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} -.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} -@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} -.listingblock pre.highlightjs{padding:0} -.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} -.listingblock pre.prettyprint{border-width:0} -.listingblock>.content{position:relative} -.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} -.listingblock:hover code[data-lang]:before{display:block} -.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} -.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} -table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} -table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} -table.pyhltable td.code{padding-left:.75em;padding-right:0} -pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} -pre.pygments .lineno{display:inline-block;margin-right:.25em} -table.pyhltable .linenodiv{background:none!important;padding-right:0!important} -.quoteblock{margin:0 1em 1.25em 1.5em;display:table} -.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} -.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} -.quoteblock blockquote{margin:0;padding:0;border:0} -.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} -.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} -.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} -.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} -.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} -.quoteblock .quoteblock blockquote:before{display:none} -.verseblock{margin:0 1em 1.25em 1em} -.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} -.verseblock pre strong{font-weight:400} -.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} -.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} -.quoteblock .attribution br,.verseblock .attribution br{display:none} -.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} -.quoteblock.abstract{margin:0 0 1.25em 0;display:block} -.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} -.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} -table.tableblock{max-width:100%;border-collapse:separate} -table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} -table.spread{width:100%} -table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} -table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} -table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} -table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} -table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} -table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} -table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} -table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} -table.frame-all{border-width:1px} -table.frame-sides{border-width:0 1px} -table.frame-topbot{border-width:1px 0} -th.halign-left,td.halign-left{text-align:left} -th.halign-right,td.halign-right{text-align:right} -th.halign-center,td.halign-center{text-align:center} -th.valign-top,td.valign-top{vertical-align:top} -th.valign-bottom,td.valign-bottom{vertical-align:bottom} -th.valign-middle,td.valign-middle{vertical-align:middle} -table thead th,table tfoot th{font-weight:bold} -tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} -tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} -p.tableblock>code:only-child{background:none;padding:0} -p.tableblock{font-size:1em} -td>div.verse{white-space:pre} -ol{margin-left:1.75em} -ul li ol{margin-left:1.5em} -dl dd{margin-left:1.125em} -dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} -ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} -ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} -ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} -ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} -ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} -ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} -ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} -ul.inline>li>*{display:block} -.unstyled dl dt{font-weight:400;font-style:normal} -ol.arabic{list-style-type:decimal} -ol.decimal{list-style-type:decimal-leading-zero} -ol.loweralpha{list-style-type:lower-alpha} -ol.upperalpha{list-style-type:upper-alpha} -ol.lowerroman{list-style-type:lower-roman} -ol.upperroman{list-style-type:upper-roman} -ol.lowergreek{list-style-type:lower-greek} -.hdlist>table,.colist>table{border:0;background:none} -.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} -td.hdlist1{padding-right:.75em;font-weight:bold} -td.hdlist1,td.hdlist2{vertical-align:top} -.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} -.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} -.colist>table tr>td:last-of-type{padding:.25em 0} -.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} -.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} -.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} -.imageblock>.title{margin-bottom:0} -.imageblock.thumb,.imageblock.th{border-width:6px} -.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} -.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} -.image.left{margin-right:.625em} -.image.right{margin-left:.625em} -a.image{text-decoration:none} -span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} -span.footnote a,span.footnoteref a{text-decoration:none} -span.footnote a:active,span.footnoteref a:active{text-decoration:underline} -#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} -#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} -#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} -#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} -#footnotes .footnote:last-of-type{margin-bottom:0} -#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} -.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} -.gist .file-data>table td.line-data{width:99%} -div.unbreakable{page-break-inside:avoid} -.big{font-size:larger} -.small{font-size:smaller} -.underline{text-decoration:underline} -.overline{text-decoration:overline} -.line-through{text-decoration:line-through} -.aqua{color:#00bfbf} -.aqua-background{background-color:#00fafa} -.black{color:#000} -.black-background{background-color:#000} -.blue{color:#0000bf} -.blue-background{background-color:#0000fa} -.fuchsia{color:#bf00bf} -.fuchsia-background{background-color:#fa00fa} -.gray{color:#606060} -.gray-background{background-color:#7d7d7d} -.green{color:#006000} -.green-background{background-color:#007d00} -.lime{color:#00bf00} -.lime-background{background-color:#00fa00} -.maroon{color:#600000} -.maroon-background{background-color:#7d0000} -.navy{color:#000060} -.navy-background{background-color:#00007d} -.olive{color:#606000} -.olive-background{background-color:#7d7d00} -.purple{color:#600060} -.purple-background{background-color:#7d007d} -.red{color:#bf0000} -.red-background{background-color:#fa0000} -.silver{color:#909090} -.silver-background{background-color:#bcbcbc} -.teal{color:#006060} -.teal-background{background-color:#007d7d} -.white{color:#bfbfbf} -.white-background{background-color:#fafafa} -.yellow{color:#bfbf00} -.yellow-background{background-color:#fafa00} -span.icon>.fa{cursor:default} -.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} -.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} -.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} -.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} -.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} -.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} -.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} -.conum[data-value] *{color:#fff!important} -.conum[data-value]+b{display:none} -.conum[data-value]:after{content:attr(data-value)} -pre .conum[data-value]{position:relative;top:-.125em} -b.conum *{color:inherit!important} -.conum:not([data-value]):empty{display:none} -h1,h2{letter-spacing:-.01em} -dt,th.tableblock,td.content{text-rendering:optimizeLegibility} -p,td.content{letter-spacing:-.01em} -p strong,td.content strong{letter-spacing:-.005em} -p,blockquote,dt,td.content{font-size:1.0625rem} -p{margin-bottom:1.25rem} -.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} -.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} -.print-only{display:none!important} -@media print{@page{margin:1.25cm .75cm} -*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} -a{color:inherit!important;text-decoration:underline!important} -a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} -a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} -abbr[title]:after{content:" (" attr(title) ")"} -pre,blockquote,tr,img{page-break-inside:avoid} -thead{display:table-header-group} -img{max-width:100%!important} -p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} -h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} -#toc,.sidebarblock,.exampleblock>.content{background:none!important} -#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} -.sect1{padding-bottom:0!important} -.sect1+.sect1{border:0!important} -#header>h1:first-child{margin-top:1.25rem} -body.book #header{text-align:center} -body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} -body.book #header .details{border:0!important;display:block;padding:0!important} -body.book #header .details span:first-child{margin-left:0!important} -body.book #header .details br{display:block} -body.book #header .details br+span:before{content:none!important} -body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} -body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} -.listingblock code[data-lang]:before{display:block} -#footer{background:none!important;padding:0 .9375em} -#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} -.hide-on-print{display:none!important} -.print-only{display:block!important} -.hide-for-print{display:none!important} -.show-for-print{display:inherit!important}} -</style> -<style> -.listingblock .pygments .hll { background-color: #ffffcc } -.listingblock .pygments { background: #f0f0f0; } -.listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ -.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ -.listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ -.listingblock .pygments .tok-o { color: #666666 } /* Operator */ -.listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ -.listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ -.listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ -.listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ -.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ -.listingblock .pygments .tok-ge { font-style: italic } /* Generic.Emph */ -.listingblock .pygments .tok-gr { color: #FF0000 } /* Generic.Error */ -.listingblock .pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.listingblock .pygments .tok-gi { color: #00A000 } /* Generic.Inserted */ -.listingblock .pygments .tok-go { color: #888888 } /* Generic.Output */ -.listingblock .pygments .tok-gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.listingblock .pygments .tok-gs { font-weight: bold } /* Generic.Strong */ -.listingblock .pygments .tok-gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.listingblock .pygments .tok-gt { color: #0044DD } /* Generic.Traceback */ -.listingblock .pygments .tok-kc { color: #007020; font-weight: bold } /* Keyword.Constant */ -.listingblock .pygments .tok-kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ -.listingblock .pygments .tok-kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ -.listingblock .pygments .tok-kp { color: #007020 } /* Keyword.Pseudo */ -.listingblock .pygments .tok-kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ -.listingblock .pygments .tok-kt { color: #902000 } /* Keyword.Type */ -.listingblock .pygments .tok-m { color: #40a070 } /* Literal.Number */ -.listingblock .pygments .tok-s { color: #4070a0 } /* Literal.String */ -.listingblock .pygments .tok-na { color: #4070a0 } /* Name.Attribute */ -.listingblock .pygments .tok-nb { color: #007020 } /* Name.Builtin */ -.listingblock .pygments .tok-nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.listingblock .pygments .tok-no { color: #60add5 } /* Name.Constant */ -.listingblock .pygments .tok-nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.listingblock .pygments .tok-ni { color: #d55537; font-weight: bold } /* Name.Entity */ -.listingblock .pygments .tok-ne { color: #007020 } /* Name.Exception */ -.listingblock .pygments .tok-nf { color: #06287e } /* Name.Function */ -.listingblock .pygments .tok-nl { color: #002070; font-weight: bold } /* Name.Label */ -.listingblock .pygments .tok-nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.listingblock .pygments .tok-nt { color: #062873; font-weight: bold } /* Name.Tag */ -.listingblock .pygments .tok-nv { color: #bb60d5 } /* Name.Variable */ -.listingblock .pygments .tok-ow { color: #007020; font-weight: bold } /* Operator.Word */ -.listingblock .pygments .tok-w { color: #bbbbbb } /* Text.Whitespace */ -.listingblock .pygments .tok-mb { color: #40a070 } /* Literal.Number.Bin */ -.listingblock .pygments .tok-mf { color: #40a070 } /* Literal.Number.Float */ -.listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ -.listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ -.listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ -.listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ -.listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ -.listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ -.listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.listingblock .pygments .tok-sh { color: #4070a0 } /* Literal.String.Heredoc */ -.listingblock .pygments .tok-si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.listingblock .pygments .tok-sx { color: #c65d09 } /* Literal.String.Other */ -.listingblock .pygments .tok-sr { color: #235388 } /* Literal.String.Regex */ -.listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ -.listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ -.listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ -.listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ -.listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ -.listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ -.listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ -</style> -</head> -<body class="article toc2 toc-left"> -<div id="header"> -<h1>Cats Documentation</h1> -<div class="details"> -<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.3.2</span> -</div> -<div id="toc" class="toc2"> -<div id="toctitle">Table of Contents</div> -<ul class="sectlevel1"> -<li><a href="#_introduction">1. Introduction</a> -<ul class="sectlevel2"> -<li><a href="#_why_another_library">1.1. Why another library?</a></li> -</ul> -</li> -<li><a href="#_project_maturity">2. Project Maturity</a></li> -<li><a href="#_install">3. Install</a> -<ul class="sectlevel2"> -<li><a href="#_leiningen">3.1. Leiningen</a></li> -<li><a href="#_maven">3.2. Maven</a></li> -<li><a href="#_get_the_code">3.3. Get the Code</a></li> -</ul> -</li> -<li><a href="#_user_guide">4. User Guide</a> -<ul class="sectlevel2"> -<li><a href="#_functor">4.1. Functor</a></li> -<li><a href="#_applicative">4.2. Applicative</a></li> -<li><a href="#_monad">4.3. Monad</a></li> -<li><a href="#_monad_transformers">4.4. Monad Transformers</a></li> -</ul> -</li> -<li><a href="#_monad_types">5. Monad types</a> -<ul class="sectlevel2"> -<li><a href="#_maybe">5.1. Maybe</a></li> -<li><a href="#_either">5.2. Either</a></li> -<li><a href="#_try">5.3. Try</a></li> -<li><a href="#_state">5.4. State</a></li> -<li><a href="#_reader">5.5. Reader</a></li> -<li><a href="#_writer">5.6. Writer</a></li> -<li><a href="#_continuation">5.7. Continuation</a></li> -<li><a href="#_vector">5.8. Vector</a></li> -</ul> -</li> -<li><a href="#_faq">6. FAQ</a> -<ul class="sectlevel2"> -<li><a href="#_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</a></li> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</a></li> -</ul> -</li> -<li><a href="#_how_to_contribute">7. How to Contribute?</a> -<ul class="sectlevel2"> -<li><a href="#_philosophy">7.1. Philosophy</a></li> -<li><a href="#_procedure">7.2. Procedure</a></li> -<li><a href="#_license">7.3. License</a></li> -</ul> -</li> -</ul> -</div> -</div> -<div id="content"> -<div id="preamble"> -<div class="sectionbody"> -<div class="paragraph"> -<p><span class="image"><img src="logo.png" alt="cats logo"></span></p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_introduction">1. Introduction</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>Category Theory abstractions for Clojure.</p> -</div> -<div class="sect2"> -<h3 id="_why_another_library">1.1. Why another library?</h3> -<div class="paragraph"> -<p>Because the cats library:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>targets both of the most-used Clojure implementations: <strong>Clojure (jvm)</strong> and <strong>ClojureScript(js)</strong></p> -</li> -<li> -<p>aims to have the simplest implementation of the supported abstractions.</p> -</li> -<li> -<p>aims to have more abstractions that are simple monads.</p> -</li> -<li> -<p>has documentation as first class citizen.</p> -</li> -<li> -<p>licensed under a permissive license (compared to other libraries): BSD (2-Clause)</p> -</li> -</ul> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_project_maturity">2. Project Maturity</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>Since <em>cats</em> is a young project, there can be some <a href="codox/index.html#id">API</a> breakage.</p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_install">3. Install</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>This section covers installing <em>cats</em>.</p> -</div> -<div class="sect2"> -<h3 id="_leiningen">3.1. Leiningen</h3> -<div class="paragraph"> -<p>The simplest way to use <em>cats</em> in a Clojure project is by including -it as a dependency in your <strong><em>project.clj</em></strong>:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.3.2"</span><span class="tok-p">]</span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_maven">3.2. Maven</h3> -<div class="paragraph"> -<p>Also, you can use it with Maven. First, add the Clojars repository:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><repository></span> - <span class="tok-nt"><id></span>clojars.org<span class="tok-nt"></id></span> - <span class="tok-nt"><url></span>http://clojars.org/repo<span class="tok-nt"></url></span> -<span class="tok-nt"></repository></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Then for cats:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="xml"><span class="tok-nt"><dependency></span> - <span class="tok-nt"><groupId></span>cats<span class="tok-nt"></groupId></span> - <span class="tok-nt"><artifactId></span>cats<span class="tok-nt"></artifactId></span> - <span class="tok-nt"><version></span>0.3.2<span class="tok-nt"></version></span> -<span class="tok-nt"></dependency></span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_get_the_code">3.3. Get the Code</h3> -<div class="paragraph"> -<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> -</div> -<div class="paragraph"> -<p>You can clone the public repository with this command:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> -</div> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_user_guide">4. User Guide</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>This section introduces almost all the category theory abstractions that the <em>cats</em> library -supports.</p> -</div> -<div class="paragraph"> -<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all -the abstractions and it is very easy to understand. You can read more about it in the next -section of the documentation.</p> -</div> -<div class="sect2"> -<h3 id="_functor">4.1. Functor</h3> -<div class="paragraph"> -<p>Let’s start with the functor. The Functor represents some sort of "computational context", and the -abstraction consists of one unique function: <strong>fmap</strong>.</p> -</div> -<div class="listingblock"> -<div class="title">Signature of <strong>fmap</strong> function</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The higher-order function <strong>fmap</strong> takes a plain function as the first parameter and -value wrapped in a functor context as the second parameter. It extracts the inner value -applies the function to it, and returns the result wrapped in same type as the second -parameter.</p> -</div> -<div class="paragraph"> -<p>But, what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor -wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> -</div> -<div class="listingblock"> -<div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> - -<span class="tok-c1">;; `just` function is one of two constructors of Maybe</span> - -<span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmap over <strong>just</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to -extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> -</div> -<div class="listingblock"> -<div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">from-maybe</span><span class="tok-p">]])</span> - -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => 1</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => nil</span> -<span class="tok-p">(</span><span class="tok-nf">from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absence of a value. -It is a safe substitute for <code>nil</code> and may represent failure.</p> -</div> -<div class="paragraph"> -<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> instance:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmap over <strong>nothing</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Oh, awesome, instead of raising a <code>NullPointerException</code>, it just returns <strong>nothing</strong>. Another -advantage of using the functor abstraction, is that it always returns a result -of the same type as its second argument.</p> -</div> -<div class="paragraph"> -<p>Let’s see an example of applying fmap over a Clojure vector:</p> -</div> -<div class="listingblock"> -<div class="title">Example using fmav over <strong>vector</strong>.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [2 3 4]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The main difference compared to the previous example with Clojure’s map function, is that -map returns lazy seqs no matter what collection we pass to it:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>But why can we pass vectors to fmap? Because some Clojure container types like vectors, -lists and sets also implement the functor abstraction.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_applicative">4.2. Applicative</h3> -<div class="paragraph"> -<p>Let’s continue with applicative functors. The Applicative Functor represents -some sort of "computational context" like a plain Functor, but with abilty to -execute a function wrapped in the same context.</p> -</div> -<div class="paragraph"> -<p>The Applicative Functor abstraction consists of two functions: <strong>fapply</strong> and -<strong>pure</strong>.</p> -</div> -<div class="listingblock"> -<div class="title">Signature of <strong>fapply</strong> function</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -the <strong>pure</strong> function will be explained later. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>The use case for Applicative Functors is much the same as plain Functors: safe -evaluation of some computation in a context.</p> -</div> -<div class="paragraph"> -<p>Let’s see an example to better understand the differences between functor and -applicative functor:</p> -</div> -<div class="paragraph"> -<p>Imagine you have some factory function that, depending on the language, returns a -greeter function, and you only support a few languages.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> - <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> - <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> - <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> - <span class="tok-nv">nil</span><span class="tok-p">))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Now, before using the resulting greeter you should always defensively check if returned -greeter is a valid function or is a nil value.</p> -</div> -<div class="paragraph"> -<p>Let’s convert this factory to use Maybe type:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> - <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> - <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> - <span class="tok-s">"en"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hello "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> - <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As you can see, this version of the factory differs only slightly from the -original implementation. And this tiny change gives you a new superpower: you -can apply the returned greeter to any value without a defensive nil check:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hola Alex]></span> - -<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hello Alex]></span> - -<span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Moreover, the applicative functor comes with <strong>pure</strong> function, and the main purpose of this function is -to put some value in side-effect-free context of the current type.</p> -</div> -<div class="paragraph"> -<p>Examples:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [5]></span> - -<span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">either/either-monad</span> <span class="tok-ss">:bar</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Either [:bar :right]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>If you do not understand the purpose of the <strong>pure</strong> function, the next section -should clarify its purpose.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_monad">4.3. Monad</h3> -<div class="paragraph"> -<p>Monads are the most discussed programming concept to come from category theory. Like functors and -applicatives, monads deal with data in contexts.</p> -</div> -<div class="paragraph"> -<p>Additionaly, monads can also transform contexts by unwrapping data, applying functions to it and -putting new values in a completely different context.</p> -</div> -<div class="paragraph"> -<p>The monad abstraction consists of two functions: <strong>bind</strong> and <strong>return</strong></p> -</div> -<div class="listingblock"> -<div class="title">Bind function signature.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As you can see, bind works much like a Functor but with inverted arguments. The main difference is -that in a monad, the function is a responsible for wrapping a returned value in a context.</p> -</div> -<div class="listingblock"> -<div class="title">Example usage of the bind higher-order function.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>One of the key features of the bind function is that any computation executed within the context of -bind (monad) knows the context type implicitly. With this, if you apply some computation over some -monadic value and you want to return the result in the same container context but don’t know -what that container is, you can use <code>return</code> or <code>pure</code> functions:</p> -</div> -<div class="listingblock"> -<div class="title">Usage of return function in bind context.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context -value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> -</div> -<div class="paragraph"> -<p>We now can compose any number of computations using monad <strong>*bind</strong> -functions. But observe what happens when the number of computations increases:</p> -</div> -<div class="listingblock"> -<div class="title">Composability example of bind function.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>This can quickly lead to callback hell. To solve this, <em>cats</em> comes with a powerful -macro: <strong>mlet</strong></p> -</div> -<div class="listingblock"> -<div class="title">Previous example but using <strong>mlet</strong> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -If you are coming from Haskell, mlet represents the <strong>do-syntax</strong>. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>If you want to use regular (non-monadic) let bindings inside an <code>mlet</code> block, you can do so using -<code>:let</code> and a binding vector inside the mlet bindings:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="_monad_transformers">4.4. Monad Transformers</h3> -<div class="sect3"> -<h4 id="_motivation">4.4.1. Motivation</h4> -<div class="paragraph"> -<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, -we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> - <span class="tok-p">(</span><span class="tok-ss">:use</span> <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> - <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> - -<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> -<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> -<span class="tok-c1">; contain a value of any type.</span> -<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> -<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>However, monads don’t compose as nicely as functors do. We have to actually implement -the composition ourselves.</p> -</div> -<div class="paragraph"> -<p>In some circumstances we would like combine the effects of two monads into another one. We call the -resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A -monad transformer is itself a monad.</p> -</div> -</div> -<div class="sect3"> -<h4 id="_using_monad_transformers">4.4.2. Using monad transformers</h4> -<div class="paragraph"> -<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer -using State as the base monad since we want the resulting type to be a stateful computation -that may fail: <code>s -> Maybe (a, s)</code>.</p> -</div> -<div class="paragraph"> -<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with -any other monad. The transformer functions take a Monad as their argument and they -return a reified MonadTrans:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> - -<span class="tok-c1">;;=> #<Just [#<Pair [42 {}]>]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful -function that yields a Maybe containing a pair (value, next state).</p> -</div> -<div class="paragraph"> -<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. -When working with monad transformers, we have to be explicit about what monad we are using to implement -the binding policy since there is no way to distinguish values from a transformer type from those of -a regular monad.</p> -</div> -<div class="paragraph"> -<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> -</div> -<div class="paragraph"> -<p>Let’s see it in action:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">any-char</span> <span class="tok-p">[</span><span class="tok-nv">s</span><span class="tok-p">]</span> - <span class="tok-s">"A function that takes an input string as an state and</span> -<span class="tok-s"> consumes one character yielding it as a the value. The</span> -<span class="tok-s"> new state is the input string with the character consumed.</span> - -<span class="tok-s"> It fails when there isn't a character to consume."</span> - <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">Clojure.string/blank?</span> <span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nf">data/pair</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">s</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">.substring</span> <span class="tok-nv">s</span> <span class="tok-mi">1</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-char</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [F oo]>]></span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))))</span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"Foo"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Just [#<Pair [Fo o]>]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">any-two-chars</span> <span class="tok-s">"F"</span><span class="tok-p">))</span> -<span class="tok-c1">;;=> #<Nothing ></span> - -<span class="tok-c1">; We could have written `any-two-chars` more succinctly by using `cats.core/mlet-with`,</span> -<span class="tok-c1">; which is intended as syntactic sugar for transformer usage.</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">any-two-chars</span> - <span class="tok-p">(</span><span class="tok-nf">m/mlet-with</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">any-char</span> - <span class="tok-nv">b</span> <span class="tok-nv">any-char</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> - -<span class="tok-c1">; We also define a function for applying parser to a given input</span> -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nb">parse </span><span class="tok-p">[</span><span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">parse-result</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-nv">parser</span> <span class="tok-nv">input</span><span class="tok-p">)]</span> - <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-nv">parse-result</span><span class="tok-p">))))</span></code></pre> -</div> -</div> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_monad_types">5. Monad types</h2> -<div class="sectionbody"> -<div class="paragraph"> -<p>In our examples we have seen two types that implement -the monad abstraction: Maybe and Either. But these are only two of the types -that implements the Monad abstraction. In this section, we will explain the different -monad types supported by <em>cats</em> library.</p> -</div> -<div class="sect2"> -<h3 id="_maybe">5.1. Maybe</h3> -<div class="paragraph"> -<p>This is one of the two most used monad types (also named Optional in other programming -languages).</p> -</div> -<div class="paragraph"> -<p>Maybe/Optional is a polymorphic type that represents encapsulation of an optional value; e.g. it is -used as the return type of functions which may or may not return a meaningful value when they -are applied. It consists of either an empty constructor (called None or Nothing), or a constructor -encapsulating the original data type A (written Just A or Some A).</p> -</div> -<div class="paragraph"> -<p><em>cats</em>, implements two constructors:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>(just v)</code>: represents just a value in a context.</p> -</li> -<li> -<p><code>(nothing)</code>: represents a failure or null.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>Maybe</strong> constructors.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [1]></span> -<span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Maybe types are: Functors, Applicative Functors and Monads -</td> -</tr> -</table> -</div> -</div> -<div class="sect2"> -<h3 id="_either">5.2. Either</h3> -<div class="paragraph"> -<p>Either is another type that represents a result of computation, but (in contrast with maybe) -it can return some data with a failed computation result.</p> -</div> -<div class="paragraph"> -<p>In <em>cats</em> it has two constructors:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>(left v)</code>: represents a failure.</p> -</li> -<li> -<p><code>(right v)</code>: represents a successful result.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>Either</strong> constructors.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Right [:valid-value :right]></span> - -<span class="tok-p">(</span><span class="tok-nb">left </span><span class="tok-s">"Error message"</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Either [Error message :left]></span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Either is also (like Maybe) Functor, Applicative Functor and Monad. -</td> -</tr> -</table> -</div> -</div> -<div class="sect2"> -<h3 id="_try">5.3. Try</h3> -<div class="paragraph"> -<p>Also called Exception.</p> -</div> -<div class="paragraph"> -<p>The <code>Try</code> type represents a computation that may either result in an exception -or return a successfully computed value. It’s similar to, but semantically -different from, the <code>Either</code> type.</p> -</div> -<div class="paragraph"> -<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error -handling with heap-based error handling. Instead of having an exception thrown and -having to deal with it immediately in the same thread, it disconnects the error -handling and recovery.</p> -</div> -<div class="listingblock"> -<div class="title">Usage example of <strong>try-on</strong> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Success [1]></span> - -<span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Failure [#<NullPointerException java.lang.NullPointerException>]></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that -returns a default value if a computation fails, and <code>try-or-recover</code> that lets -you handle the return value when executing a function with the exception as -first parameter.</p> -</div> -<div class="listingblock"> -<div class="title">Usage example of <code>try-or-else</code> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Success [2]></span></code></pre> -</div> -</div> -<div class="listingblock"> -<div class="title">Usage example of <code>try-or-recover</code> macro.</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">cond</span> - <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> - <span class="tok-ss">:else</span> <span class="tok-mi">100</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => #<Success [0]></span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -Try is also (like Maybe) Functor, Applicative Functor and Monad. -</td> -</tr> -</table> -</div> -</div> -<div class="sect2"> -<h3 id="_state">5.4. State</h3> -<div class="paragraph"> -<p>State monad in one of the special cases of monads most used in Haskell. It has different -purposes including: lazy computation, composition, and maintaining state without explicit state.</p> -</div> -<div class="paragraph"> -<p>The de-facto monadic type of the state monad is a plain function. Function represents a computation -as is (without executing it). Obviously, a function should have some special characteristics to work -in monad state composition.</p> -</div> -<div class="listingblock"> -<div class="title">Valid function for valid state monad</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> - <span class="tok-s">"Takes state as argument and return a vector</span> -<span class="tok-s"> with first argument with procesed value and</span> -<span class="tok-s"> second argument the transformed new state."</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> - <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> - <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>You just saw an example of the low-level primitive state monad. For basic usage -you do not need to build your own functions, just use some helpers that <em>cats</em> provides.</p> -</div> -<div class="paragraph"> -<p>Let’s look at one example before explaining the details:</p> -</div> -<div class="listingblock"> -<div class="title">Lazy composition of computations</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">m/get-state</span><span class="tok-p">)</span> - <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">m/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> -<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>At the moment of evaluation in the previous expression, anything that we have defined -is executed. But instead of returning the unadorned final value of the computation, -a strange/unknown object is returned of type <strong>State</strong>.</p> -</div> -<div class="paragraph"> -<p>State is simply a wrapper for Clojure functions, nothing more.</p> -</div> -<div class="paragraph"> -<p>Now, it’s time to execute the composed computation. For this we can use one of the following -functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>run-state</code> function executes the composed computation and returns both the value and the -result state.</p> -</li> -<li> -<p><code>eval-state</code> function executes the composed computation and returns the resulting value -discarding the state.</p> -</li> -<li> -<p><code>exec-state</code> function executes the composed computation and return only the resulting -state, ignoring the resulting value.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">This is what happens when we execute these three functions over previously generated <code>State</code> instance</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="Clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> -<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> 1</span> -<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> (2 3)</span></code></pre> -</div> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -the pair instance returned by <code>run-state</code> function works like any other seq in Clojure, with -the difference that pairs can only have two slots. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>This is a very basic example of the state monad, it has a lot of use cases and explaining all them -seems out of the scope of this document.</p> -</div> -<div class="paragraph"> -<p>However, if you have better examples to explain the state monad, documentation for another monad or -any other contribution is always welcome.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_reader">5.5. Reader</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_writer">5.6. Writer</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_continuation">5.7. Continuation</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="_vector">5.8. Vector</h3> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_faq">6. FAQ</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_what_are_the_difference_with_other_existing_libraries">6.1. What are the difference with other existing libraries?</h3> -<div class="paragraph"> -<p>This is an incomplete list of differences with other existing libraries:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>The official monads library <code>algo.monads</code> is very good, but its approach for modeling -is slighty limited (e.g. you always need to specify what monad you want use instead of -relying on the type). And obviously because it only has monads.</p> -</li> -<li> -<p>Fluokitten is the best library that we found, but the future of it is uncertain. One big -difference with fluokitten is that <code>cats</code> doesn’t aim to extend every Clojure type -with monadic protocols, for the obvious reason that monad; functor and applicative represents -context/wrapper types and it doesn’t make sense to implement Functor protocol for <code>java.lang.String</code>.</p> -</li> -<li> -<p><code>bwo/monads</code> is the last monads library. It is completely undocumented and its implementation -has much unnecesary complexity.</p> -</li> -</ul> -</div> -</div> -<div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">6.2. What Clojure types implements some of the Category Theory abstractions?</h3> -<div class="paragraph"> -<p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types -that don’t act like containers. For example, Clojure keywords are values but can not be containers so -they should not extend any of the previously explained protocols.</p> -</div> -<table class="tableblock frame-all grid-all spread"> -<caption class="title">Table 1. Summary of Clojure types and implemented protocols</caption> -<colgroup> -<col style="width: 50%;"> -<col style="width: 50%;"> -</colgroup> -<thead> -<tr> -<th class="tableblock halign-left valign-top">Name</th> -<th class="tableblock halign-left valign-top">Implemented protocols</th> -</tr> -</thead> -<tbody> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -<tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> -</tr> -</tbody> -</table> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="_how_to_contribute">7. How to Contribute?</h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="_philosophy">7.1. Philosophy</h3> -<div class="paragraph"> -<p>Five most important rules:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Beautiful is better than ugly.</p> -</li> -<li> -<p>Explicit is better than implicit.</p> -</li> -<li> -<p>Simple is better than complex.</p> -</li> -<li> -<p>Complex is better than complicated.</p> -</li> -<li> -<p>Readability counts.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p>All contributions to <em>cats</em> should keep these important rules in mind.</p> -</div> -</div> -<div class="sect2"> -<h3 id="_procedure">7.2. Procedure</h3> -<div class="paragraph"> -<p><em>cats</em> does not have many restrictions for contributions. Just follow these -steps depending on the situation:</p> -</div> -<div class="paragraph"> -<p><strong>Bugfix</strong>:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Fork the GitHub repo.</p> -</li> -<li> -<p>Fix a bug/typo on a new branch.</p> -</li> -<li> -<p>Make a pull-request to master.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p><strong>New feature</strong>:</p> -</div> -<div class="ulist"> -<ul> -<li> -<p>Open new issue with the new feature proposal.</p> -</li> -<li> -<p>If it is accepted, follow the same steps as "bugfix".</p> -</li> -</ul> -</div> -</div> -<div class="sect2"> -<h3 id="_license">7.3. License</h3> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> -Copyright (c) 2014-2015 Alejandro Gómez - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</code></pre> -</div> -</div> -</div> -</div> -</div> -</div> -<div id="footer"> -<div id="footer-text"> -Last updated 2015-02-21 11:53:38 CET -</div> -</div> -</body> -</html> \ No newline at end of file diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html new file mode 100644 index 0000000..7083c80 --- /dev/null +++ b/latest/api/cats.applicative.validation.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L179">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L105">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L118">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L112">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L172">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L124">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index fd80930..4c313f6 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L188">view source</a></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L47">view source</a></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L141">view source</a></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L94">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index 6153efe..afa4195 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,12 +1,12 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"><code>(<$> f)</code><code>(<$> f fv)</code></div><div class="doc"><div class="markdown"><p>Alias of fmap.</p></div></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"><code>(<*> af av)</code><code>(<*> af av & avs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative fapply.</p></div></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fmap alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L366">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fapply alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L370">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L410">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L425">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L396">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L402">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L388">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context <code>mv</code> and any function, applies a function to value of mv.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L374">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context <code>mv</code> and any function, applies a function to value of mv.</p> <pre><code>(bind (either/right 1) (fn [v] (return (inc v)))) ;; => #<Right [2]> -</code></pre><p>For convenience, you may prefer use a <code>mlet</code> macro that add a beautiful, let like syntax for compose operations with <code>bind</code> function.</p></div></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af av)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s conext and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p></div></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> +</code></pre><p>For convenience, you may prefer use a <code>mlet</code> macro that add a beautiful, let like syntax for compose operations with <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L117">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L419">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s context and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p><p>This function is variadic, so it can be used like a haskell style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L176">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> <pre><code>(require '[cats.monad.moaybe :as maybe]) (require '[cats.core :as m]) @@ -15,7 +15,7 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>Let se a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L341">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L166">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>Let se a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> </code></pre><p>Yet an other example that fails:</p> @@ -25,7 +25,7 @@ (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is same as that <code>(bind mv identity)</code></p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L321">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L154">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is same as that <code>(bind mv identity)</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L160">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L203">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> <pre><code>(def monad+ (lift-m 2 +)) (monad+ (maybe/just 1) (maybe/just 2)) @@ -36,7 +36,7 @@ (monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6] -</code></pre></div></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L252">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L87">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -49,26 +49,26 @@ (maybe/nothing))) [1 2]) ;=> <Nothing> -</code></pre></div></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L300">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L82">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) - (fn [b] - (return (* b 2)))))) + (fn [b] + (return (* b 2)))))) ;=> #<Just [4]> </code></pre><p>Now see how this code can be more clear if you are using mlet macro for do it:</p> <pre><code>(mlet [a (just 1) b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L214">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L148">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L141">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> <pre><code>(with-monad either/either-monad (pure 1) ;; => #<Right [1]> -</code></pre></div></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure and it works identically to it.</p></div></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L93">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure and it works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L111">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> <pre><code>(sequence [(maybe/just 2) (maybe/just 3)]) ;; => <Just [[2, 3]]> (sequence [(maybe/nothing) (maybe/just 3)]) ;; => <Nothing> -</code></pre></div></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L279">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L196">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L188">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L42">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index cdcee63..031f069 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L72">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L76">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.channel.html b/latest/api/cats.monad.channel.html deleted file mode 100644 index b42017b..0000000 --- a/latest/api/cats.monad.channel.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.continuation.html b/latest/api/cats.monad.continuation.html index 0ad670e..94c1afc 100644 --- a/latest/api/cats.monad.continuation.html +++ b/latest/api/cats.monad.continuation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L82">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L51">view source</a></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index 360812a..52c6248 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) @@ -7,4 +7,4 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div></div><div class="public anchor" id="var-from-either"><h3><a href="#var-from-either">from-either</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(from-either mv)</code></div><div class="doc"><div class="markdown"><p>Return inner value of either monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Either monad.</p><p>The use of this function is DEPRECATED and <code>cats.core/extract</code> should be used.</p></div></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L205">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L215">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L223">view source</a></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L172">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L129">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L242">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L246">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L250">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L107">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L117">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L234">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L112">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L123">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L238">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index 31f3044..1f2c3ea 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L66">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L72">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.html b/latest/api/cats.monad.html index 473264f..5180ab5 100644 --- a/latest/api/cats.monad.html +++ b/latest/api/cats.monad.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index dc4d240..d4785da 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L67">view source</a></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L101">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index 064c33c..6a6d4fc 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,10 +1,10 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]> -</code></pre></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> +</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L297">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> <pre><code>(from-maybe (just 1)) ;=> 1 @@ -13,4 +13,4 @@ (from-maybe (nothing) 42) ;=> 42 -</code></pre></div></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L134">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L107">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L120">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L303">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L269">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L287">view source</a></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L217">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L99">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L115">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L126">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L279">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.reader.html b/latest/api/cats.monad.reader.html index 68eee5f..b60f7e4 100644 --- a/latest/api/cats.monad.reader.html +++ b/latest/api/cats.monad.reader.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L155">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L161">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L48">view source</a></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L102">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L147">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.state.html b/latest/api/cats.monad.state.html index 4cacb70..7350310 100644 --- a/latest/api/cats.monad.state.html +++ b/latest/api/cats.monad.state.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L236">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L246">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L204">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L218">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L53">view source</a></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L117">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L211">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.writer.html b/latest/api/cats.monad.writer.html index 6a0a646..566852e 100644 --- a/latest/api/cats.monad.writer.html +++ b/latest/api/cats.monad.writer.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L165">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L171">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L159">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L177">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L50">view source</a></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L101">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L62">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index a2e49cb..bb2c603 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Functor abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"><code>(ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for <code>ctx</code>.</p></div></div></div></div></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L63">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L34">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L54">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L59">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L72">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"><code>(ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L94">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L113">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L100">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L77">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L50">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 0611e97..8fad8cc 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.4.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.4.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.continuation.html">cats.monad.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.monad.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.monad.continuation.html#var-continuation-monad">continuation-monad</a> </li><li> <a href="cats.monad.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-from-either">from-either</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.reader.html">cats.monad.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.reader.html#var-ask">ask</a> </li><li> <a href="cats.monad.reader.html#var-local">local</a> </li><li> <a href="cats.monad.reader.html#var-reader">reader</a> </li><li> <a href="cats.monad.reader.html#var-reader-transformer">reader-transformer</a> </li><li> <a href="cats.monad.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.monad.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.state.html">cats.monad.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.monad.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.monad.state.html#var-get-state">get-state</a> </li><li> <a href="cats.monad.state.html#var-put-state">put-state</a> </li><li> <a href="cats.monad.state.html#var-run-state">run-state</a> </li><li> <a href="cats.monad.state.html#var-state-t">state-t</a> </li><li> <a href="cats.monad.state.html#var-state-transformer">state-transformer</a> </li><li> <a href="cats.monad.state.html#var-state.3F">state?</a> </li><li> <a href="cats.monad.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.writer.html">cats.monad.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.writer.html#var-listen">listen</a> </li><li> <a href="cats.monad.writer.html#var-log">log</a> </li><li> <a href="cats.monad.writer.html#var-pass">pass</a> </li><li> <a href="cats.monad.writer.html#var-tell">tell</a> </li><li> <a href="cats.monad.writer.html#var-value">value</a> </li><li> <a href="cats.monad.writer.html#var-writer-transformer">writer-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.5.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 4f09e0e..d23c5a5 100644 --- a/latest/index.html +++ b/latest/index.html @@ -7,408 +7,6 @@ <meta name="generator" content="Asciidoctor 1.5.2"> <meta name="author" content="Andrey Antukh & Alejandro Gómez"> <title>Cats Documentation</title> -<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400"> -<style> -/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ -/* Remove the comments around the @import statement below when using this as a custom stylesheet */ -/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/ -article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} -audio,canvas,video{display:inline-block} -audio:not([controls]){display:none;height:0} -[hidden],template{display:none} -script{display:none!important} -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} -body{margin:0} -a{background:transparent} -a:focus{outline:thin dotted} -a:active,a:hover{outline:0} -h1{font-size:2em;margin:.67em 0} -abbr[title]{border-bottom:1px dotted} -b,strong{font-weight:bold} -dfn{font-style:italic} -hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} -mark{background:#ff0;color:#000} -code,kbd,pre,samp{font-family:monospace;font-size:1em} -pre{white-space:pre-wrap} -q{quotes:"\201C" "\201D" "\2018" "\2019"} -small{font-size:80%} -sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} -sup{top:-.5em} -sub{bottom:-.25em} -img{border:0} -svg:not(:root){overflow:hidden} -figure{margin:0} -fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} -legend{border:0;padding:0} -button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} -button,input{line-height:normal} -button,select{text-transform:none} -button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} -button[disabled],html input[disabled]{cursor:default} -input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} -input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box} -input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none} -button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} -textarea{overflow:auto;vertical-align:top} -table{border-collapse:collapse;border-spacing:0} -*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} -html,body{font-size:100%} -body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto} -a:hover{cursor:pointer} -img,object,embed{max-width:100%;height:auto} -object,embed{height:100%} -img{-ms-interpolation-mode:bicubic} -#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important} -.left{float:left!important} -.right{float:right!important} -.text-left{text-align:left!important} -.text-right{text-align:right!important} -.text-center{text-align:center!important} -.text-justify{text-align:justify!important} -.hide{display:none} -.antialiased,body{-webkit-font-smoothing:antialiased} -img{display:inline-block;vertical-align:middle} -textarea{height:auto;min-height:50px} -select{width:100%} -p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6} -.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} -div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} -a{color:#2156a5;text-decoration:underline;line-height:inherit} -a:hover,a:focus{color:#1d4b8f} -a img{border:none} -p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} -p aside{font-size:.875em;line-height:1.35;font-style:italic} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} -h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} -h1{font-size:2.125em} -h2{font-size:1.6875em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} -h4,h5{font-size:1.125em} -h6{font-size:1em} -hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} -em,i{font-style:italic;line-height:inherit} -strong,b{font-weight:bold;line-height:inherit} -small{font-size:60%;line-height:inherit} -code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} -ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} -ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em} -ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} -ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} -ul.square{list-style-type:square} -ul.circle{list-style-type:circle} -ul.disc{list-style-type:disc} -ul.no-bullet{list-style:none} -ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} -dl dt{margin-bottom:.3125em;font-weight:bold} -dl dd{margin-bottom:1.25em} -abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} -abbr{text-transform:none} -blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} -blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} -blockquote cite:before{content:"\2014 \0020"} -blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} -blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} -@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} -h1{font-size:2.75em} -h2{font-size:2.3125em} -h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} -h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} -table thead,table tfoot{background:#f7f8f7;font-weight:bold} -table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} -table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} -table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} -table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} -h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} -h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} -.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table} -.clearfix:after,.float-group:after{clear:both} -*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed} -pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} -.keyseq{color:rgba(51,51,51,.8)} -kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap} -.keyseq kbd:first-child{margin-left:0} -.keyseq kbd:last-child{margin-right:0} -.menuseq,.menu{color:rgba(0,0,0,.8)} -b.button:before,b.button:after{position:relative;top:-1px;font-weight:400} -b.button:before{content:"[";padding:0 3px 0 2px} -b.button:after{content:"]";padding:0 2px 0 3px} -p a>code:hover{color:rgba(0,0,0,.9)} -#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} -#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table} -#header:after,#content:after,#footnotes:after,#footer:after{clear:both} -#content{margin-top:1.25em} -#content:before{content:none} -#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} -#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8} -#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px} -#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} -#header .details span:first-child{margin-left:-.125em} -#header .details span.email a{color:rgba(0,0,0,.85)} -#header .details br{display:none} -#header .details br+span:before{content:"\00a0\2013\00a0"} -#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} -#header .details br+span#revremark:before{content:"\00a0|\00a0"} -#header #revnumber{text-transform:capitalize} -#header #revnumber:after{content:"\00a0"} -#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} -#toc{border-bottom:1px solid #efefed;padding-bottom:.5em} -#toc>ul{margin-left:.125em} -#toc ul.sectlevel0>li>a{font-style:italic} -#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} -#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} -#toc a{text-decoration:none} -#toc a:active{text-decoration:underline} -#toctitle{color:#7a2518;font-size:1.2em} -@media only screen and (min-width:768px){#toctitle{font-size:1.375em} -body.toc2{padding-left:15em;padding-right:0} -#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} -#toc.toc2 #toctitle{margin-top:0;font-size:1.2em} -#toc.toc2>ul{font-size:.9em;margin-bottom:0} -#toc.toc2 ul ul{margin-left:0;padding-left:1em} -#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} -body.toc2.toc-right{padding-left:0;padding-right:15em} -body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} -#toc.toc2{width:20em} -#toc.toc2 #toctitle{font-size:1.375em} -#toc.toc2>ul{font-size:.95em} -#toc.toc2 ul ul{padding-left:1.25em} -body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -#content #toc>:first-child{margin-top:0} -#content #toc>:last-child{margin-bottom:0} -#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} -#footer-text{color:rgba(255,255,255,.8);line-height:1.44} -.sect1{padding-bottom:.625em} -@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed} -#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} -#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} -#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} -#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} -#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} -.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} -.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} -table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0} -.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)} -table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit} -.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} -.admonitionblock>table td.icon{text-align:center;width:80px} -.admonitionblock>table td.icon img{max-width:none} -.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} -.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)} -.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} -.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} -.exampleblock>.content>:first-child{margin-top:0} -.exampleblock>.content>:last-child{margin-bottom:0} -.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} -.sidebarblock>:first-child{margin-top:0} -.sidebarblock>:last-child{margin-bottom:0} -.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} -.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} -.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} -.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} -.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em} -.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal} -@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} -.listingblock pre.highlightjs{padding:0} -.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} -.listingblock pre.prettyprint{border-width:0} -.listingblock>.content{position:relative} -.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} -.listingblock:hover code[data-lang]:before{display:block} -.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999} -.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"} -table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} -table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0} -table.pyhltable td.code{padding-left:.75em;padding-right:0} -pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8} -pre.pygments .lineno{display:inline-block;margin-right:.25em} -table.pyhltable .linenodiv{background:none!important;padding-right:0!important} -.quoteblock{margin:0 1em 1.25em 1.5em;display:table} -.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} -.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} -.quoteblock blockquote{margin:0;padding:0;border:0} -.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} -.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} -.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right} -.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)} -.quoteblock .quoteblock blockquote{padding:0 0 0 .75em} -.quoteblock .quoteblock blockquote:before{display:none} -.verseblock{margin:0 1em 1.25em 1em} -.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} -.verseblock pre strong{font-weight:400} -.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} -.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} -.quoteblock .attribution br,.verseblock .attribution br{display:none} -.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)} -.quoteblock.abstract{margin:0 0 1.25em 0;display:block} -.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0} -.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none} -table.tableblock{max-width:100%;border-collapse:separate} -table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0} -table.spread{width:100%} -table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} -table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0} -table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0} -table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0} -table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0} -table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0} -table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0} -table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0} -table.frame-all{border-width:1px} -table.frame-sides{border-width:0 1px} -table.frame-topbot{border-width:1px 0} -th.halign-left,td.halign-left{text-align:left} -th.halign-right,td.halign-right{text-align:right} -th.halign-center,td.halign-center{text-align:center} -th.valign-top,td.valign-top{vertical-align:top} -th.valign-bottom,td.valign-bottom{vertical-align:bottom} -th.valign-middle,td.valign-middle{vertical-align:middle} -table thead th,table tfoot th{font-weight:bold} -tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} -tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} -p.tableblock>code:only-child{background:none;padding:0} -p.tableblock{font-size:1em} -td>div.verse{white-space:pre} -ol{margin-left:1.75em} -ul li ol{margin-left:1.5em} -dl dd{margin-left:1.125em} -dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} -ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} -ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none} -ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em} -ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em} -ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px} -ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden} -ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block} -ul.inline>li>*{display:block} -.unstyled dl dt{font-weight:400;font-style:normal} -ol.arabic{list-style-type:decimal} -ol.decimal{list-style-type:decimal-leading-zero} -ol.loweralpha{list-style-type:lower-alpha} -ol.upperalpha{list-style-type:upper-alpha} -ol.lowerroman{list-style-type:lower-roman} -ol.upperroman{list-style-type:upper-roman} -ol.lowergreek{list-style-type:lower-greek} -.hdlist>table,.colist>table{border:0;background:none} -.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} -td.hdlist1{padding-right:.75em;font-weight:bold} -td.hdlist1,td.hdlist2{vertical-align:top} -.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} -.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1} -.colist>table tr>td:last-of-type{padding:.25em 0} -.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} -.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0} -.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em} -.imageblock>.title{margin-bottom:0} -.imageblock.thumb,.imageblock.th{border-width:6px} -.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} -.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} -.image.left{margin-right:.625em} -.image.right{margin-left:.625em} -a.image{text-decoration:none} -span.footnote,span.footnoteref{vertical-align:super;font-size:.875em} -span.footnote a,span.footnoteref a{text-decoration:none} -span.footnote a:active,span.footnoteref a:active{text-decoration:underline} -#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} -#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0} -#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em} -#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none} -#footnotes .footnote:last-of-type{margin-bottom:0} -#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} -.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} -.gist .file-data>table td.line-data{width:99%} -div.unbreakable{page-break-inside:avoid} -.big{font-size:larger} -.small{font-size:smaller} -.underline{text-decoration:underline} -.overline{text-decoration:overline} -.line-through{text-decoration:line-through} -.aqua{color:#00bfbf} -.aqua-background{background-color:#00fafa} -.black{color:#000} -.black-background{background-color:#000} -.blue{color:#0000bf} -.blue-background{background-color:#0000fa} -.fuchsia{color:#bf00bf} -.fuchsia-background{background-color:#fa00fa} -.gray{color:#606060} -.gray-background{background-color:#7d7d7d} -.green{color:#006000} -.green-background{background-color:#007d00} -.lime{color:#00bf00} -.lime-background{background-color:#00fa00} -.maroon{color:#600000} -.maroon-background{background-color:#7d0000} -.navy{color:#000060} -.navy-background{background-color:#00007d} -.olive{color:#606000} -.olive-background{background-color:#7d7d00} -.purple{color:#600060} -.purple-background{background-color:#7d007d} -.red{color:#bf0000} -.red-background{background-color:#fa0000} -.silver{color:#909090} -.silver-background{background-color:#bcbcbc} -.teal{color:#006060} -.teal-background{background-color:#007d7d} -.white{color:#bfbfbf} -.white-background{background-color:#fafafa} -.yellow{color:#bfbf00} -.yellow-background{background-color:#fafa00} -span.icon>.fa{cursor:default} -.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} -.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c} -.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} -.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900} -.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400} -.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000} -.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} -.conum[data-value] *{color:#fff!important} -.conum[data-value]+b{display:none} -.conum[data-value]:after{content:attr(data-value)} -pre .conum[data-value]{position:relative;top:-.125em} -b.conum *{color:inherit!important} -.conum:not([data-value]):empty{display:none} -h1,h2{letter-spacing:-.01em} -dt,th.tableblock,td.content{text-rendering:optimizeLegibility} -p,td.content{letter-spacing:-.01em} -p strong,td.content strong{letter-spacing:-.005em} -p,blockquote,dt,td.content{font-size:1.0625rem} -p{margin-bottom:1.25rem} -.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} -.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} -.print-only{display:none!important} -@media print{@page{margin:1.25cm .75cm} -*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} -a{color:inherit!important;text-decoration:underline!important} -a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} -a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} -abbr[title]:after{content:" (" attr(title) ")"} -pre,blockquote,tr,img{page-break-inside:avoid} -thead{display:table-header-group} -img{max-width:100%!important} -p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} -h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} -#toc,.sidebarblock,.exampleblock>.content{background:none!important} -#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important} -.sect1{padding-bottom:0!important} -.sect1+.sect1{border:0!important} -#header>h1:first-child{margin-top:1.25rem} -body.book #header{text-align:center} -body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0} -body.book #header .details{border:0!important;display:block;padding:0!important} -body.book #header .details span:first-child{margin-left:0!important} -body.book #header .details br{display:block} -body.book #header .details br+span:before{content:none!important} -body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} -body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} -.listingblock code[data-lang]:before{display:block} -#footer{background:none!important;padding:0 .9375em} -#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em} -.hide-on-print{display:none!important} -.print-only{display:block!important} -.hide-for-print{display:none!important} -.show-for-print{display:inherit!important}} -</style> <style> .listingblock .pygments .hll { background-color: #ffffcc } .listingblock .pygments { background: #f0f0f0; } @@ -474,13 +72,15 @@ .listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ .listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ </style> +<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Liberation+Mono:400|Roboto+Slab:400,700"/> +<link rel="stylesheet" href="https://www.niwi.nz/_assets/asciidoctor-styles/simple-red-titles/stylesheet.css"/> </head> <body class="article toc2 toc-left"> <div id="header"> <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.4.0</span> +<span id="revdate">0.5.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -491,40 +91,43 @@ <h1>Cats Documentation</h1> <li><a href="#_install">4. Install</a> <ul class="sectlevel2"> <li><a href="#_leiningen">4.1. Leiningen</a></li> -<li><a href="#_get_the_code">4.2. Get the Code</a></li> </ul> </li> <li><a href="#_user_guide">5. User Guide</a> <ul class="sectlevel2"> -<li><a href="#_functor">5.1. Functor</a></li> -<li><a href="#_applicative">5.2. Applicative</a></li> -<li><a href="#_monad">5.3. Monad</a></li> -<li><a href="#_monad_transformers">5.4. Monad Transformers</a></li> +<li><a href="#_semigroup">5.1. Semigroup</a></li> +<li><a href="#_monoid">5.2. Monoid</a></li> +<li><a href="#_functor">5.3. Functor</a></li> +<li><a href="#_applicative">5.4. Applicative</a></li> +<li><a href="#_monad">5.5. Monad</a></li> +<li><a href="#_monadzero">5.6. MonadZero</a></li> +<li><a href="#_monadplus">5.7. MonadPlus</a></li> +<li><a href="#_monad_transformers">5.8. Monad Transformers</a></li> </ul> </li> -<li><a href="#_monad_types">6. Monad types</a> +<li><a href="#_types">6. Types</a> <ul class="sectlevel2"> <li><a href="#_maybe">6.1. Maybe</a></li> <li><a href="#_either">6.2. Either</a></li> <li><a href="#_exception">6.3. Exception</a></li> -<li><a href="#_state">6.4. State</a></li> -<li><a href="#_reader">6.5. Reader</a></li> -<li><a href="#_writer">6.6. Writer</a></li> -<li><a href="#_continuation">6.7. Continuation</a></li> -<li><a href="#_vector">6.8. Vector</a></li> -<li><a href="#_other_monads">6.9. Other monads</a></li> +<li><a href="#_validation">6.4. Validation</a></li> +<li><a href="#_built_in_types">6.5. Built in types</a></li> +<li><a href="#_complementary_libraries">6.6. Complementary libraries</a></li> </ul> </li> <li><a href="#_faq">7. FAQ</a> <ul class="sectlevel2"> -<li><a href="#_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</a></li> +<li><a href="#_what_clojure_types_implement_some_of_the_category_theory_abstractions">7.1. What Clojure types implement some of the Category Theory abstractions?</a></li> +<li><a href="#_where_are_the_state_reader_writer_and_continuation_monads">7.2. Where are the State, Reader, Writer and Continuation monads?</a></li> </ul> </li> -<li><a href="#_how_to_contribute">8. How to Contribute?</a> +<li><a href="#_developers_guide">8. Developers Guide</a> <ul class="sectlevel2"> <li><a href="#_philosophy">8.1. Philosophy</a></li> -<li><a href="#_procedure">8.2. Procedure</a></li> -<li><a href="#_license">8.3. License</a></li> +<li><a href="#_contributing">8.2. Contributing</a></li> +<li><a href="#_source_code">8.3. Source Code</a></li> +<li><a href="#_run_tests">8.4. Run tests</a></li> +<li><a href="#_license">8.5. License</a></li> </ul> </li> </ul> @@ -542,7 +145,7 @@ <h1>Cats Documentation</h1> <h2 id="_introduction">1. Introduction</h2> <div class="sectionbody"> <div class="paragraph"> -<p>Category Theory abstractions for Clojure.</p> +<p>Category Theory and algebraic abstractions for Clojure.</p> </div> </div> </div> @@ -550,24 +153,24 @@ <h2 id="_introduction">1. Introduction</h2> <h2 id="_rationale">2. Rationale</h2> <div class="sectionbody"> <div class="paragraph"> -<p>The main motivations for writting this library are:</p> +<p>The main motivations for writing this library are:</p> </div> <div class="ulist"> <ul> <li> -<p>The existing libraries does not have support for ClojureScript.</p> +<p>The existing libraries do not have support for ClojureScript.</p> </li> <li> -<p>We do not intend to write a little haskell inside the clojure. We have adopted a -practical and clojure like approach, always with corectness in mind.</p> +<p>We do not intend to write a little Haskell inside Clojure. We have adopted a +practical and Clojure like approach, always with correctness in mind.</p> </li> <li> -<p>We do not like viral/copyleft like licenses and with difference with other libraries -cats is licensed under BSD (2 clauses) license.</p> +<p>We do not like viral/copyleft like licenses and in contrast to other libraries +cats is licensed under the BSD (2 clauses) license.</p> </li> <li> -<p>We do not intend implement only monads. Other category theory abstractions are also -first class in cats.</p> +<p>We do not intend to only implement monads. Other category theory and algebraic abstractions +are also first class in cats.</p> </li> </ul> </div> @@ -577,19 +180,19 @@ <h2 id="_rationale">2. Rationale</h2> <div class="ulist"> <ul> <li> -<p><strong>algo.monads</strong>: This is the clojure official library for monads. Its approach for modeling -monads is slightly limited, only supports the monad abstraction and does not has support for +<p><strong>algo.monads</strong>: This is the official Clojure library for monads. Its approach for modeling +monads is slightly limited, only supports the monad abstraction and does not have support for ClojureScript.</p> </li> <li> -<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on to be very practictical -without take care of corectness (as example, it extends clojure types with monadic abstractions -that not make sense). Also does not has support for ClojureScript.</p> +<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on being very practical +without taking care of correctness (for example, it extends Clojure types with monadic abstractions +that do not make sense). It has no support for ClojureScript either.</p> </li> <li> -<p><strong>monads</strong>: is the most advanced monads library, supports also functors, applicatives and other -related abstractions. It lacks of good and readable documentation, fucused on correctness, has -haskell like sugar syntax (instead of clojure like syntax) and not has support for ClojureScript.</p> +<p><strong>monads</strong>: Is the most advanced monads library, supports also functors, applicatives and other +related abstractions. It lacks a good and readable documentation, focus on correctness, has +Haskell like sugar syntax (instead of Clojure like syntax) and does not have support for ClojureScript.</p> </li> </ul> </div> @@ -620,42 +223,79 @@ <h3 id="_leiningen">4.1. Leiningen</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">cats</span> <span class="tok-s">"0.4.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"0.5.0"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> -<div class="sect2"> -<h3 id="_get_the_code">4.2. Get the Code</h3> +</div> +</div> +<div class="sect1"> +<h2 id="_user_guide">5. User Guide</h2> +<div class="sectionbody"> <div class="paragraph"> -<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> +<p>This section introduces almost all the category theory and algebraic abstractions that the <em>cats</em> library +supports.</p> </div> <div class="paragraph"> -<p>You can clone the public repository with this command:</p> +<p>We will use <em>Maybe</em> for the example snippets, because it has support for all +the abstractions and is very easy to understand. You can read more about it in the next +section of this documentation.</p> +</div> +<div class="sect2"> +<h3 id="_semigroup">5.1. Semigroup</h3> +<div class="paragraph"> +<p>A semigroup is an algebraic structure with an associative binary operation (<code>mappend</code>). Most of the builtin collections +form a semigroup because their associative binary operation is analogous to Clojure’s <code>into</code>.</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [1 2 3 4 5 6]</span></code></pre> </div> </div> +<div class="paragraph"> +<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple <em>Maybe</em> values.</p> </div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Just [1 2 3 4 5 6]></span></code></pre> </div> </div> -<div class="sect1"> -<h2 id="_user_guide">5. User Guide</h2> -<div class="sectionbody"> +</div> +<div class="sect2"> +<h3 id="_monoid">5.2. Monoid</h3> <div class="paragraph"> -<p>This section introduces almost all the category theory abstractions that the <em>cats</em> library -supports.</p> +<p>A Monoid is a Semigroup with an identity element (<code>mempty</code>). For the collection types the <code>mempty</code> +function is analogous to Clojure’s <code>empty</code>.</p> </div> <div class="paragraph"> -<p>We will use the <em>Maybe</em> for the example snippets, because it has support for all -the abstractions and it is very easy to understand. You can read more about it in the next -section of this documentation.</p> +<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple +<em>Maybe</em>, with Nothing being the identity element.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just [1 2 3 4 5 6]></span></code></pre> +</div> +</div> </div> <div class="sect2"> -<h3 id="_functor">5.1. Functor</h3> +<h3 id="_functor">5.3. Functor</h3> <div class="paragraph"> -<p>Let’s start with the functor. The Functor represents some sort of "computational context", and the +<p>Let’s dive into the functor. The Functor represents some sort of "computational context", and the abstraction consists of one unique function: <strong>fmap</strong>.</p> </div> <div class="listingblock"> @@ -666,12 +306,12 @@ <h3 id="_functor">5.1. Functor</h3> </div> <div class="paragraph"> <p>The higher-order function <strong>fmap</strong> takes a plain function as the first parameter and -value wrapped in a functor context as the second parameter. It extracts the inner value -applies the function to it, and returns the result wrapped in same type as the second -parameter.</p> +a value wrapped in a functor context as the second parameter. It extracts the +inner value, applies the function to it and returns the result wrapped in same type +as the second parameter.</p> </div> <div class="paragraph"> -<p>But, what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor +<p>But what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> </div> <div class="listingblock"> @@ -680,14 +320,14 @@ <h3 id="_functor">5.1. Functor</h3> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> -<p>The <code>just</code> function is a constructor of Just type that is part of Maybe monad.</p> +<p>The <code>just</code> function is a constructor of the Just type that is part of the Maybe monad.</p> </div> <div class="paragraph"> -<p>Let’s see one example using <strong>fmap</strong> over <strong>just</strong> instance:</p> +<p>Let’s see one example of using <strong>fmap</strong> over a <strong>just</strong> instance:</p> </div> <div class="listingblock"> <div class="title">Example using fmap over <strong>just</strong> instance.</div> @@ -695,7 +335,7 @@ <h3 id="_functor">5.1. Functor</h3> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> @@ -724,7 +364,9 @@ <h3 id="_functor">5.1. Functor</h3> <div class="listingblock"> <div class="title">Example using fmav over <strong>vector</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 3 4]</span></code></pre> </div> </div> @@ -739,15 +381,15 @@ <h3 id="_functor">5.1. Functor</h3> </div> </div> <div class="paragraph"> -<p>But why can we pass vectors to <code>fmap</code> function? Because some Clojure container types like vectors, -lists and sets, also implement the functor abstraction.</p> +<p>But why can we pass vectors to the <code>fmap</code> function? Because some Clojure container types like vectors, +lists and sets, also implement the functor abstraction. See the section on built-in types for more information.</p> </div> </div> <div class="sect2"> -<h3 id="_applicative">5.2. Applicative</h3> +<h3 id="_applicative">5.4. Applicative</h3> <div class="paragraph"> <p>Let’s continue with applicative functors. The Applicative Functor represents -some sort of "computational context" like a plain Functor, but with ability to +some sort of "computational context" like a plain Functor, but with the ability to execute a function wrapped in the same context.</p> </div> <div class="paragraph"> @@ -773,7 +415,7 @@ <h3 id="_applicative">5.2. Applicative</h3> </table> </div> <div class="paragraph"> -<p>The use case for Applicative Functors is much the same as plain Functors: safe +<p>The use case for Applicative Functors is roughly the same as for plain Functors: safe evaluation of some computation in a context.</p> </div> <div class="paragraph"> @@ -795,11 +437,11 @@ <h3 id="_applicative">5.2. Applicative</h3> </div> </div> <div class="paragraph"> -<p>Now, before using the resulting greeter you should always defensively check if returned -greeter is a valid function or is a nil value.</p> +<p>Now, before using the resulting greeter you should always defensively check if +the returned greeter is a valid function or a nil value.</p> </div> <div class="paragraph"> -<p>Let’s convert this factory to use Maybe type:</p> +<p>Let’s convert this factory to use the Maybe type:</p> </div> <div class="listingblock"> <div class="content"> @@ -819,18 +461,18 @@ <h3 id="_applicative">5.2. Applicative</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hola Alex]></span> +<span class="tok-c1">;; => #<Just "Hola Alex"></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just [Hello Alex]></span> +<span class="tok-c1">;; => #<Just "Hello Alex"></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> <div class="paragraph"> -<p>Moreover, the applicative functor comes with <strong>pure</strong> function, and the main purpose of this function is -to put some value in side-effect-free context of the current type.</p> +<p>Moreover, the applicative functor comes with the <strong>pure</strong> function, which allows +you to put some value in side-effect-free context of the current type.</p> </div> <div class="paragraph"> <p>Examples:</p> @@ -840,7 +482,7 @@ <h3 id="_applicative">5.2. Applicative</h3> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [5]></span></code></pre> +<span class="tok-c1">;; => #<Just 5></span></code></pre> </div> </div> <div class="paragraph"> @@ -849,13 +491,13 @@ <h3 id="_applicative">5.2. Applicative</h3> </div> </div> <div class="sect2"> -<h3 id="_monad">5.3. Monad</h3> +<h3 id="_monad">5.5. Monad</h3> <div class="paragraph"> <p>Monads are the most discussed programming concept to come from category theory. Like functors and applicatives, monads deal with data in contexts.</p> </div> <div class="paragraph"> -<p>Additionaly, monads can also transform contexts by unwrapping data, applying functions to it and +<p>Additionally, monads can also transform contexts by unwrapping data, applying functions to it and putting new values in a completely different context.</p> </div> <div class="paragraph"> @@ -869,14 +511,14 @@ <h3 id="_monad">5.3. Monad</h3> </div> <div class="paragraph"> <p>As you can see, bind works much like a Functor but with inverted arguments. The main difference is -that in a monad, the function is a responsible for wrapping a returned value in a context.</p> +that in a monad, the function is responsible for wrapping a returned value in a context.</p> </div> <div class="listingblock"> <div class="title">Example usage of the bind higher-order function.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> @@ -891,7 +533,7 @@ <h3 id="_monad">5.3. Monad</h3> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> -<span class="tok-c1">;; => #<Just [2]></span></code></pre> +<span class="tok-c1">;; => #<Just 2></span></code></pre> </div> </div> <div class="paragraph"> @@ -950,9 +592,119 @@ <h3 id="_monad">5.3. Monad</h3> </div> </div> <div class="sect2"> -<h3 id="_monad_transformers">5.4. Monad Transformers</h3> +<h3 id="_monadzero">5.6. MonadZero</h3> +<div class="paragraph"> +<p>Some monads also have the notion of an identity element analogous to that of Monoid. When calling <code>bind</code> on a identity element +for a monad, the same value is returned. This means that whenever we encounter the identity element in a monadic composition it will +short-circuit.</p> +</div> +<div class="paragraph"> +<p>For the already familiar Maybe type the identity element is Nothing:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mzero</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Having an identity element we can make a monadic composition short-circuit using a predicate:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">m/mzero</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">_</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can see in the above example the predicate <code>(= a 2)</code> returns either a monadic value <code>(m/return nil)</code> or the identity value +for the maybe monad. This can be captured in a function, which is available in <code>cats.core</code> namespace:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">guard</span> + <span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-nv">b</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">mzero</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The above example could be rewritten as:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">m/guard</span> <span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">_</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p><code>mlet</code> has support for using guards using a <code>:when</code> clause, analogous to the one used in <code>for</code>. We could rewrite the above example +using <code>bind</code> with <code>mlet</code> and <code>:when</code>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-ss">:when</span> <span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Any monadic type that implements <code>MonadZero</code> can be combined with guards inside <code>mlet</code> bindings.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_monadplus">5.7. MonadPlus</h3> +<div class="paragraph"> +<p>MonadPlus is a complementary abstraction for Monads that support an associative binary operation, analogous to that of a +Semigroup. If the monad implements the MonadZero and MonadPlus protocols it forms a monoid.</p> +</div> +<div class="paragraph"> +<p>For the Maybe type, <code>mplus</code> acts similarly to a logical OR that treats <code>Nothing</code> values as falsey.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mplus</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span> + +<span class="tok-p">(</span><span class="tok-nf">m/mplus</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 1></span> + +<span class="tok-p">(</span><span class="tok-nf">m/mplus</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 1></span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_monad_transformers">5.8. Monad Transformers</h3> <div class="sect3"> -<h4 id="_motivation">5.4.1. Motivation</h4> +<h4 id="_motivation">5.8.1. Motivation</h4> <div class="paragraph"> <p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> @@ -972,7 +724,7 @@ <h4 id="_motivation">5.4.1. Motivation</h4> <span class="tok-c1">; combined functor is a vector of Maybe values that could</span> <span class="tok-c1">; contain a value of any type.</span> <span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> -<span class="tok-c1">;;=> [#<Just [2]> #<Just [3]>]</span></code></pre> +<span class="tok-c1">;; => [#<Just 2> #<Just 3>]</span></code></pre> </div> </div> <div class="paragraph"> @@ -981,12 +733,12 @@ <h4 id="_motivation">5.4.1. Motivation</h4> </div> <div class="paragraph"> <p>In some circumstances we would like combine the effects of two monads into another one. We call the -resulting monad a monad transformer, which is the composition of a "base" and a "inner" monad. A +resulting monad a monad transformer, which is the composition of a "base" and "inner" monad. A monad transformer is itself a monad.</p> </div> </div> <div class="sect3"> -<h4 id="_using_monad_transformers">5.4.2. Using monad transformers</h4> +<h4 id="_using_monad_transformers">5.8.2. Using monad transformers</h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad since we want the resulting type to be a stateful computation @@ -1010,7 +762,7 @@ <h4 id="_using_monad_transformers">5.4.2. Using monad transformers</h4> <span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> -<span class="tok-c1">;; => #<Just [#<Pair [42 {}]>]></span></code></pre> +<span class="tok-c1">;; => #<Just #<Pair [42 {}]>></span></code></pre> </div> </div> <div class="paragraph"> @@ -1031,7 +783,7 @@ <h4 id="_using_monad_transformers">5.4.2. Using monad transformers</h4> </div> </div> <div class="sect1"> -<h2 id="_monad_types">6. Monad types</h2> +<h2 id="_types">6. Types</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_maybe">6.1. Maybe</h3> @@ -1040,10 +792,10 @@ <h3 id="_maybe">6.1. Maybe</h3> languages).</p> </div> <div class="paragraph"> -<p>Maybe monad represents encapsulation of an optional value; e.g. it is used as the return type +<p>The Maybe monad represents encapsulation of an optional value; e.g. it is used as the return type of functions which may or may not return a meaningful value when they are applied. It consists of either an empty constructor (called None or Nothing), or a constructor -encapsulating the original data type A (written Just A or Some A).</p> +encapsulating the original data type A (e.g. Just A or Some A).</p> </div> <div class="paragraph"> <p><em>cats</em>, implements two types:</p> @@ -1051,7 +803,7 @@ <h3 id="_maybe">6.1. Maybe</h3> <div class="ulist"> <ul> <li> -<p><code>Just</code> that represents just a value in a context.</p> +<p><code>Just</code> that represents a value in a context.</p> </li> <li> <p><code>Nothing</code> that represents the abscense of value.</p> @@ -1059,27 +811,27 @@ <h3 id="_maybe">6.1. Maybe</h3> </ul> </div> <div class="listingblock"> -<div class="title">Example creating instances of <code>Just</code> and <code>Nothing</code> types</div> +<div class="title">Example creating instances of <code>Just</code> and <code>Nothing</code> types:</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Just [1]></span> +<span class="tok-c1">;; => #<Just 1></span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> <div class="paragraph"> -<p>In the same ns, it there other usefull functions for work with maybe monad types. See the api -documentation for see a full list of them. But here we will exaplain a little relevant subset -of they.</p> +<p>There are other useful functions for working with maybe monad types in the same namespace. +See the API documentation for a full list of them. But here we will explain a little relevant subset +of them.</p> </div> <div class="paragraph"> -<p>We mentioned above that <strong>fmap</strong> extracts the value from the functor context. You will also want to +<p>We mentioned above that <strong>fmap</strong> extracts the value from a functor context. You will also want to extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> </div> <div class="paragraph"> -<p>The Just or Nothing instances as we said previously, acts like a wrappers and in some circumstances -you will want extract the plain value from them. For it, cats offers the <code>from-maybe</code> function.</p> +<p>As we said previously, the Just or Nothing instances act like wrappers and in some circumstances +you will want extract the plain value from them. cats offers the <code>from-maybe</code> function for that.</p> </div> <div class="listingblock"> <div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> @@ -1095,14 +847,29 @@ <h3 id="_maybe">6.1. Maybe</h3> </div> </div> <div class="paragraph"> -<p>The <code>from-maybe</code> function is a specialized version more generic one: <code>cats.core/extract</code>. The generic -version is a polymorphic function and will work also with different types of different monads.</p> +<p>The <code>from-maybe</code> function is a specialized version of a more generic one: <code>cats.core/extract</code>. +The generic version is a polymorphic function and will also work with different +types of different monads.</p> +</div> +<div class="paragraph"> +<p>For interoperability with Clojure and ClojureScript’s <code>IDeref</code> abstraction, maybe values are +derrefable.</p> +</div> +<div class="listingblock"> +<div class="title">Example using <strong>deref</strong> to extract values wrapped by <strong>just</strong>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">deref </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nb">deref </span><span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span></code></pre> +</div> </div> </div> <div class="sect2"> <h3 id="_either">6.2. Either</h3> <div class="paragraph"> -<p>Either is another type that represents a result of computation, but (in contrast with maybe) +<p>Either is another type that represents a result of a computation, but (in contrast with maybe) it can return some data with a failed computation result.</p> </div> <div class="paragraph"> @@ -1137,29 +904,33 @@ <h3 id="_either">6.2. Either</h3> <div class="title">Note</div> </td> <td class="content"> -Either is also (like Maybe) Functor, Applicative Functor and Monad. +Either is also (like Maybe) a Functor, Applicative Functor and Monad. </td> </tr> </table> </div> +<div class="paragraph"> +<p>Like Maybe, Either values can be dereferenced returning the value they contain.</p> +</div> </div> <div class="sect2"> <h3 id="_exception">6.3. Exception</h3> <div class="paragraph"> -<p>Also known as Try monad, popularized by Scala.</p> +<p>Also known as the Try monad, as popularized by Scala.</p> </div> <div class="paragraph"> <p>It represents a computation that may either result in an exception or return a successfully computed -value. Is very similar to Either monad, but is semantically different.</p> +value. Is very similar to the Either monad, but is semantically different.</p> </div> <div class="paragraph"> -<p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of -Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an -instance of Throwable (or Error in cljs).</p> +<p>It consists of two types: Success and Failure. The Success type is a simple +wrapper, like Right of the Either monad. But the Failure type is slightly different +from Left, because it always wraps an instance of Throwable (or any value in cljs since you can +throw arbitrary values in the JavaScript host).</p> </div> <div class="paragraph"> -<p>The most common use case of this monad is for wrap third party libraries that uses standard Exception -based error handling. In normal circumstances you should use Either instead.</p> +<p>The most common use case of this monad is to wrap third party libraries that use standard Exception +based error handling. Under normal circumstances, however, you should use Either instead.</p> </div> <div class="paragraph"> <p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error handling with @@ -1202,13 +973,13 @@ <h3 id="_exception">6.3. Exception</h3> </div> </div> <div class="paragraph"> -<p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref -interface, which facilitates libraries developing using monadic composition without forcing a user of +<p>The types defined for the Exception monad (Success and Failure) also implement the Clojure IDeref +interface, which allows library development using monadic composition without forcing a user of that library to use or understand monads.</p> </div> <div class="paragraph"> -<p>That is because when you will dereference the failure instance, it will reraise the containing -exception.</p> +<p>That is because when you dereference the failure instance, it will reraise the +enclosed exception.</p> </div> <div class="listingblock"> <div class="title">Example dereferencing a failure instance</div> @@ -1221,125 +992,201 @@ <h3 id="_exception">6.3. Exception</h3> </div> </div> <div class="sect2"> -<h3 id="_state">6.4. State</h3> +<h3 id="_validation">6.4. Validation</h3> <div class="paragraph"> -<p>State monad in one of the special cases of monads most used in Haskell. It has different -purposes including: lazy computation, composition, and maintaining state without explicit state.</p> +<p>The validation type is similar to the Either or Exception types except that it +doesn’t implement a Monad instance. It has two constructors: <code>ok</code> and <code>fail</code>, +representing success and failure respectively.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #<Ok 42></span> + +<span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">[])</span> +<span class="tok-c1">;; => #<Fail []></span></code></pre> +</div> </div> <div class="paragraph"> -<p>The de-facto monadic type of the state monad is a plain function. Function represents a computation -as is (without executing it). Obviously, a function should have some special characteristics to work -in monad state composition.</p> +<p>It implements the Applicative protocol, and its intended usage is as an Applicative. Applying Validation +values together errs on the side of the failure, and applying failures together aggregates their values +using the Semigroup’s <code>mappend</code> function.</p> </div> <div class="listingblock"> -<div class="title">Valid function for valid state monad</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> - <span class="tok-s">"Takes state as argument and return a vector</span> -<span class="tok-s"> with first argument with procesed value and</span> -<span class="tok-s"> second argument the transformed new state."</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> - <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> - <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-s">"OH NOES"</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Fail "OH NOES"></span> + +<span class="tok-c1">;; Note that `<*>` is a variadic fapply</span> +<span class="tok-p">(</span><span class="tok-nf">m/<*></span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:foo</span> <span class="tok-s">"bar"</span><span class="tok-p">})</span> + <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:baz</span> <span class="tok-s">"fubar"</span><span class="tok-p">})</span> + <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">99</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Fail {:baz "fubar", :foo "bar"}></span></code></pre> </div> </div> -<div class="paragraph"> -<p>You just saw an example of the low-level primitive state monad. For basic usage -you do not need to build your own functions, just use some helpers that <em>cats</em> provides.</p> </div> +<div class="sect2"> +<h3 id="_built_in_types">6.5. Built in types</h3> <div class="paragraph"> -<p>Let’s look at one example before explaining the details:</p> +<p>Some of the abstractions in <em>cats</em> are implemented for built-in types but you can’t use them directly. First, +you must load the <code>cats.builtin</code> namespace:</p> </div> <div class="listingblock"> -<div class="title">Lazy composition of computations</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">st</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">st/get-state</span><span class="tok-p">)</span> - <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">st/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> -<span class="tok-c1">;;=> #<State cats.monad.state.State@2eebabb6></span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 3 4 5]</span></code></pre> </div> </div> +<div class="sect3"> +<h4 id="_nil">6.5.1. nil</h4> <div class="paragraph"> -<p>At the moment of evaluation in the previous expression, nothing of that we have defined -is executed. But instead of returning the unadorned final value of the computation, -a strange/unknown object is returned of type <strong>State</strong>.</p> +<p>Given the fact that <code>nil</code> is both a value and a type, we have extended the <code>nil</code> type to be equivalent +to Maybe monad’s <code>Nothing</code>. This means that you can use <code>nil</code> as if were a <code>Just</code> instance like in the +following example:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">42</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-nv">nil</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => nil</span></code></pre> +</div> </div> <div class="paragraph"> -<p>The State type is simply a wrapper for Clojure functions, nothing more.</p> +<p>As you can see, the <code>mlet</code> short-circuits when encountering a <code>nil</code> value.</p> </div> +</div> +<div class="sect3"> +<h4 id="_vector">6.5.2. Vector</h4> <div class="paragraph"> -<p>Now, it’s time to execute the composed computation. For this we can use one of the following -functions exposed by <em>cats</em>: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> +<p>Clojure vectors also participate in several of the abstractions implemented in <em>cats</em>, most notably +as a monad. Compare the following <code>for</code> comprehension:</p> </div> -<div class="ulist"> -<ul> -<li> -<p><code>run-state</code> function executes the composed computation and returns both the value and the -result state.</p> -</li> -<li> -<p><code>eval-state</code> function executes the composed computation and returns the resulting value -discarding the state.</p> -</li> -<li> -<p><code>exec-state</code> function executes the composed computation and return only the resulting -state, ignoring the resulting value.</p> -</li> -</ul> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">for </span><span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> + <span class="tok-nv">y</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">))</span> +<span class="tok-c1">;; => (4 5 6 5 6 7)</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>with the equivalent using <em>mlet</em>:</p> </div> <div class="listingblock"> -<div class="title">Example of resuls of using the previosly listed functions</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> #<Pair [1 (2 3)]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> 1</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;;=> (2 3)</span></code></pre> +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> + <span class="tok-nv">y</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => [4 5 6 5 6 7]</span></code></pre> </div> </div> <div class="paragraph"> -<p>The <code>run-state</code> function returns an instance of Pair type. The Pair type acts like any other seq in -clojure with the exception that it only can contain two values.</p> +<p>Note the symmetry between <code>for</code> and <code>mlet</code>. This is not accidental, both are what is called a monad comprehension, +the difference is that <code>for</code> is limited to sequences and <code>mlet</code> can work with arbitrary monads.</p> </div> +<div class="paragraph"> +<p>Also, since <code>mlet</code> desugars into calls to the Monad’s <code>bind</code> function, its result keeps the type of the monadic values.</p> </div> -<div class="sect2"> -<h3 id="_reader">6.5. Reader</h3> +</div> +<div class="sect3"> +<h4 id="_lazy_sequences">6.5.3. Lazy sequences</h4> <div class="paragraph"> -<p>TODO</p> +<p>Lazy sequences implement the same abstractions as vectors with practically an identical implementation. If you don’t need +the results right away or are interested in a subset of the final results, you can use lazy sequence comprehensions.</p> </div> +<div class="paragraph"> +<p>Using <code>mlet</code> with lazy sequences yields exactly the same result as using <code>for</code>:</p> </div> -<div class="sect2"> -<h3 id="_writer">6.6. Writer</h3> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">lazy-seq</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">])</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">lazy-seq</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => (4 5 6 5 6 7)</span></code></pre> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="_set">6.5.4. Set</h4> <div class="paragraph"> -<p>TODO</p> +<p>Sets implement almost every abstraction in <em>cats</em>, from Semigroup to Monad.</p> </div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/pure</span> <span class="tok-nv">set-monad</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => #{42}</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-o">#</span><span class="tok-p">{</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">})</span> +<span class="tok-c1">;; => #{4 3 2 5}</span> + +<span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-o">#</span><span class="tok-p">{</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">}</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-o">#</span><span class="tok-p">{</span><span class="tok-nv">v</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">)}))</span> +<span class="tok-c1">;; => #{1 4 3 2}</span></code></pre> </div> -<div class="sect2"> -<h3 id="_continuation">6.7. Continuation</h3> +</div> +</div> +<div class="sect3"> +<h4 id="_map">6.5.5. Map</h4> <div class="paragraph"> -<p>TODO</p> +<p>Maps implement the <em>Semigroup</em> protocol, since we can use <code>merge</code> as their associative binary operation. Using +<code>mappend</code> on maps is a way to merge them together:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-s">"A"</span><span class="tok-p">}</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-s">"B"</span><span class="tok-p">})</span> +<span class="tok-c1">;; => {:a "A", :b "B"}</span></code></pre> </div> </div> -<div class="sect2"> -<h3 id="_vector">6.8. Vector</h3> <div class="paragraph"> -<p>TODO</p> +<p>Since we can consider the empty map an identity element for the <code>mappend</code> associative binary operation maps also +implement <em>Monoid</em> and the <code>mempty</code> function gives an empty map.</p> +</div> </div> </div> <div class="sect2"> -<h3 id="_other_monads">6.9. Other monads</h3> +<h3 id="_complementary_libraries">6.6. Complementary libraries</h3> <div class="paragraph"> -<p>Some monads are defined as separated package for avoid add additional -and unnecesary dependencies to cats library.</p> +<p>Some monads are defined as separated package to avoid additional +and unnecesary dependencies to cats. Also, there are some libraries +that build higher-level abstractions on top of what cats offers.</p> </div> <div class="ulist"> <ul> <li> -<p>Channel monad: <a href="https://github.com/funcool/cats-channel" class="bare">https://github.com/funcool/cats-channel</a></p> +<p>Channel monad: <a href="https://github.com/funcool/canal" class="bare">https://github.com/funcool/canal</a></p> +</li> +<li> +<p>Promise monad: <a href="https://github.com/funcool/promesa" class="bare">https://github.com/funcool/promesa</a></p> +</li> +<li> +<p>Concurrent data fetching: <a href="https://github.com/kachayev/muse" class="bare">https://github.com/kachayev/muse</a></p> </li> </ul> </div> @@ -1350,7 +1197,7 @@ <h3 id="_other_monads">6.9. Other monads</h3> <h2 id="_faq">7. FAQ</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions">7.1. What Clojure types implements some of the Category Theory abstractions?</h3> +<h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions">7.1. What Clojure types implement some of the Category Theory abstractions?</h3> <div class="paragraph"> <p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types that don’t act like containers. For example, Clojure keywords are values but can not be containers so @@ -1370,24 +1217,34 @@ <h3 id="_what_clojure_types_implements_some_of_the_category_theory_abstractions" </thead> <tbody> <tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">sequence</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +</tr> +<tr> <td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> </tr> <tr> -<td class="tableblock halign-left valign-top"><p class="tableblock">list</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">hash-map</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid</p></td> </tr> </tbody> </table> </div> +<div class="sect2"> +<h3 id="_where_are_the_state_reader_writer_and_continuation_monads">7.2. Where are the State, Reader, Writer and Continuation monads?</h3> +<div class="paragraph"> +<p>TBD</p> +</div> +</div> </div> </div> <div class="sect1"> -<h2 id="_how_to_contribute">8. How to Contribute?</h2> +<h2 id="_developers_guide">8. Developers Guide</h2> <div class="sectionbody"> <div class="sect2"> <h3 id="_philosophy">8.1. Philosophy</h3> @@ -1418,47 +1275,43 @@ <h3 id="_philosophy">8.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_procedure">8.2. Procedure</h3> +<h3 id="_contributing">8.2. Contributing</h3> <div class="paragraph"> -<p><em>cats</em> does not have many restrictions for contributions. Just follow these -steps depending on the situation:</p> +<p>Unlike Clojure and other Clojure contributed libraries, <em>cats</em> does not have many +restrictions for contributions. Just open an issue or pull request.</p> +</div> </div> +<div class="sect2"> +<h3 id="_source_code">8.3. Source Code</h3> <div class="paragraph"> -<p><strong>Bugfix</strong>:</p> +<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> </div> -<div class="ulist"> -<ul> -<li> -<p>Fork the GitHub repo.</p> -</li> -<li> -<p>Fix a bug/typo on a new branch.</p> -</li> -<li> -<p>Make a pull-request to master.</p> -</li> -</ul> +<div class="paragraph"> +<p>You can clone the public repository with this command:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> </div> +</div> +</div> +<div class="sect2"> +<h3 id="_run_tests">8.4. Run tests</h3> <div class="paragraph"> -<p><strong>New feature</strong>:</p> +<p>For running tests just execute this:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">lein test</code></pre> </div> -<div class="ulist"> -<ul> -<li> -<p>Open new issue with the new feature proposal.</p> -</li> -<li> -<p>If it is accepted, follow the same steps as "bugfix".</p> -</li> -</ul> </div> </div> <div class="sect2"> -<h3 id="_license">8.3. License</h3> +<h3 id="_license">8.5. License</h3> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.be> -Copyright (c) 2014-2015 Alejandro Gómez +<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.nz> +Copyright (c) 2014-2015 Alejandro Gómez <alejandro@dialelo.com> All rights reserved. @@ -1490,7 +1343,7 @@ <h3 id="_license">8.3. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-03-25 20:42:52 CET +Last updated 2015-07-13 01:32:36 EEST </div> </div> </body> diff --git a/logo.png b/logo.png deleted file mode 100644 index 9f1a8f949faea6d5a7768f1aa02b68a648f87979..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5208 zcmV-e6sPNnP)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00004b3#c}2nYxW zd<bNS00009a7bBm000}W000}W0bUxB8~^|S8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H16V*vXK~#90?VWj?71fo;zlT+2iyH`tw8j{hpg0;gL{MVJjJufV zd_Y4qL1UuHn9R6FjWL=;qZ311Mx&z>HIul6pdUnn8r0~3F}NTqk!Euth=PcUG~D^) z+-Kh|>b+N0_tvXwyMLe0`E>QGyWdlHIrrRi#27;-Ixe~tU4Tv$i%tgU;OJz44vtO+ z=-}vNfDVp!&j2FQwZObZMA~&5w#&kcNEZ>AC?b=Aw?$-yh}<tCdp0Ql5h5}TcpF$Q zB6o?%*hb_X9LAV-ML=I*3SeUBBj947YfgFh1g-(rSIPfIpnK76l&Vfe7a(N^GyyMG zX?&L+2eu2G_h*4Q3G$u^Y*BPuec~7Z*aY}nf)1$A+rR|h(E#WUd=q#tMcxkrQgoYr z(iq^zn1-GLoC|!}etB`7F(3F^+M(Gp+_!<nRnmO`7z<noOpAGcLD6mYiD3X>T%>V7 z1Wt|#_Z7Pii0iO-fZthW*b&$?61NwyGjKXE8CYE<oz=h>WAgqMu+9nB0*orU?b<y9 z0Gk6VBb{(ejqu-1F;uSv769+2h%>%M-V-8W7XdwsZo~G@09Qok*9389r0CEzba$P6 z1$Z(N=etF>VJ#}P96&?{0B1QrwE+KCCr(#%xX%MCL`15+G|C0vK|8*J^F*X~PUZ1O z(HvOki@KJ!U(>Z!!gU1>0Db~2C7-XqLJNRPfW4@)(g$vj#JRBOwyfI5MHiq(=WmNH z_S}Zt%Xz;Qx;VT8Sdnw5SEDz8TY=+&eoooOM8d5EHZQtO<EUHRA)+`;L?v%7Mu^Br z;5c9e#f!4HK^J}#fEE#X1h^O2G7|2!Xhabif{t3ffj+=yz%#(3#+VQDD{=%yb6}OP zzZ>v6#eCJFX(2E;GO}F<tgRA$4RAloR9$j!>!Lfm3IiNhf{qJ8%Ye@~_4*+jPiwVk z7BIXcGQdM6=)4d##;H>p`GiX?z?I~6z*Tf-$8`RVz=jfZo-e)R)agj7pCBfs*d35B z6}^ax!$ee|(%x}1fQWQM&oO-4`b-fytA4O_5X+&ZfQa-&_wid5T^3KQLl=I_MdUc( zo<QktK*iuw0;N~F5nwFszw-eeH^wZt&!+`Uw+nEWi0l|L!7}0Wq6-iRA2`qZ1x~vc zaDJ%7O2YsmvMVq$L)1T`+r}Zl0ALV$jz1?{=>T{P_$tsJ6##7qoCN$eCagQJ=F!IE ztsu!CMX&mum2y<>pM*|u;`czMYTcdR&d!i#l-2<!*2(9bNSr@9@7@nkhTL`qr5OQ$ z6EeivTtr5R$Q`K4)@opxh)fcZt&K5P<2MJl0ADf2{8mJoMC2Cqq;WOyu87<uBKx9> zsxI7iUF?y6Eqq->`g^BR^p|hHl3fY^h0Fs6qn(lUuxOrBzSmO3TZ29PL65WZ7y%4$ z&L?FA7@b3!I|DCZwRE$lAtEz?+34CLDK-O6wa>SrBSs!L&^v{qzkd6b{Eqy-lA@>? zE4~FT$SIGveA~Vhf*=uDhOVv~jb*@ebY4FIRq_al<Bc)*0Eoz~=m}qF>|~6YpE-63 zzWy}x|C_)K=+-a9aq)gmIl2IIJ<?hXJPiB_WhjHLJ$AF{cSG+BgdPPp(vEI#Yk=KT zgdKn?Tbyf*8HAp#p9s8^G4Invq@UIEI|^Mlq`@3idby1;W;@_gU?}h@`+f`HArWaZ z#<bY54`wWDHSFXSy96UZMTs)Y7uO6d<Z#uLHmIh`-F1qn0jWGce2<32yN$vrGTw z)Ba^p39B{tuLYh(_3PiVv>N@wwz9M%dUqh}HSycf!<y63YhY>6f^H8NIOSUf^mEF$ z127DDQbZ;gW9|k{5s@XpMH$QN!fWkRb_Q4myn=o~)fiv{x<$)!h_n>A3K)o<L;N~r z{I_iR{!VoUXtC*U1N>e@{@oaJl`-aG5m^dcPj==7-^FtYrhq>Zeqoe^K0sIgBY~$; z9fT_zl=oRq{SPPI#nULg;?@2oV1TDmR(LLOIdBFlKAxVT(Wat9a}zqf7~lu!mv~;v z4!O^k<6FSb&=Da?yopX5jG?-cXgzwly)!_y+qY4A2{;s8^&SLVhTi;5(^yMT9sa(+ zDQtY_@E-J3aS-sE6zRTz-V#0lU6UMvPFuC&YyiIMw8M#HQ-yo3-7)|=>{h$Yn+Ls# z8kne;XEQplx8z)&^|U={{9cAMX8H6%p>hDDwZ6T9Sq=bpq5f*W3HUUAi?bvUVE@Y9 zL1WC%QDIUVto12Cp$uRJFjt`p9d8v`mI5#n*ax^1cveIz2Ue${cL$Qf?-o%3!~P(k zzkU8RI^1rJ?&W_$W2b~7=w;w&TmL3>t80Keoi;i*MSAzQn>7F`YF!EpwErJ(EAgE3 z+fZN<x=ky(vqI8xbf?hGVg3b?Fr)0dZm0k(NxC&{7L<kofZ@PDfaT6_KXNLv0NB-e zw+*_js%EOCz0e2fwe`ME-G-qzi=$y5aKaptF#S79&j7%lw4RVX=KOwFq%!XkG5>-d zs9b_t{VKXM(@--i>Kz=Z&;B*)vH|#<6ZX*r`CMOW2CyBt&?)fk&b$As(g>FjF}{Fa zq5co*@2`ub4^gK6LbUw04u?`-$n@V%_>l?n{6T3M0NrIwjTHEY&ih&?d4B-<R7rO@ zdeb)PJefB=i|YPWH4q7$OfqTTN3^|8Uhkspsbyw>i(?8r!TF-=HO4$(WSu;=N9_j9 z#Qy?jQffg(*q7p1EvZtzT}f}W>Pjd60d>NDsgw)={BxBK8D-z^k)lEV2UWVLm*>{N zc=W8`Zgh7MLN9+csu+4Bx^t;(?gbS$|D3kA1C!D!+M1mCYmKmb`1DgQI)Ngx9cu0* zYAOZPhVK#)ITkgik`(WvYlB}J)vife7C|+Kc5<jc`W3gJ9Ta_DhYF_Vq1U{Zq$npM zauT|O*(OcA2+lFa{LH2|5oNwOY-NmDkvW$fzWg4jWs5j&{RnIJgluwe13V8LOHKw8 zJnFp#s@?QL#(G8RHK2!0yEpO1EEjl}JBNn2u12NiJK-jIHqcUZjWIZM9a7X)(4*YD zNN4&bDSge!>xP*3x0Q+kfG^dl(Bn?ns0<)0twX1hL$Ok}6y+TP9EO!bCXCY^U6@@A zyqZI&yEK<p8xDKMy#IP>7yz}dU9Ul=JK-ni&|vQaPoQTC<5AIb+<ts?Oj+jvpN|RK z1Kp2bh$^3~$+^>`bc9ou=+yezGBLoV2`b~>n*CFQ8gLbGiIeXHs;|sH0FHFRUQT|u zdy~>kr#z=Rzb^~XZ$XZOMdUN6l&&6J!wH*($U6c0qMASz+r!sVT^V*0;3g5N-1c1t zY?^xsYh$Fnfei3lbTJ6(6~!B&^Z|aw##TM!;GSLg3Y2#e%&>pQp#rE{7=Z5e0UpV% zMCtH70AtJ=R8<YsV1+ll89+o%Ko?+1P{atZ&=|AOJ`YP6rxNaY^x&pw94#W7+vkev z`pggsdoh5B^Z~9;5yfSIMvVaO7oSvMQVG|M#xZIw^g!L>V2pVNxX=FehVKY)7U}NI z7r_8qipci%c~-(Wm2jU!*9B$3IOjQ-kHX9hAR?R4)|o@1XwLJ7ta)cZ#ZuS3sOPa- zcm&<<x$(+?kygZxv0H*5@Ywc!lk{7fTb%ew{Qrfbxme#l=vUobCESa^P#dlfZS@$+ zK<9?qwtL9|P<81nQn0B`8hQEksYX9>^6rgZEO`P|Q=5t24C?8Gi4(mRP0yEw0ltv2 z0&|=+?r3o1wV+d0O^1#sbDvLn4OV*{|ArC-9i1`WK<D|zjA>*=S5!niqnfEzYpn8d z;K!8LVD-5AL6RerK7fcULM>%x!BAt&Vi7qAHT6;ymZCZf^U*Vdf1)jemK96UHVm_f z&M^EB$8QKb*`~7z*>A*lbQ)3Q6mW2cI4(v57<G&^+cT|>iZP)Q%EABxJo9uJ==Yv! zbyOS@DxoY4;A_vnNkm52=Q~g}u|{J(s&X|8Ra<`=y{Xek;gk>d6Ok~dlo{3lArv`o zb<(>#Kzd2&CE%y1zrk32LR8!55OlZD+@Nx0r7>yyE{Gfe_)CDozXxn$)BBg48)`0a zc!qikYPBPJfwL_1<DwYg=|B}Y+@{x+e4IpnfQqZTq6bf3L<K>+rL1oc^tyHy{r)`Z z$)XtG)<6}w(MdDvY}uDy$LjZ?%9PEK_j5_9O^i+rMfoU>qjgldI+r&CoEfMBuhA-q zni#NQUaE91x?qhOf~wHNq;$=S-sxWysGK1v_0$%nEW3apiU_D4LB%@v6M@ov2UY5< zIBUKL-RazfP64|D-$w;d2cxcD62lntDr!@BO`!7n!hbuMVFc(!xJ#JF*)#_QNNXK% zNTjTbfWu<yFb3W7tp+yD&<4j)j>DqAHGB%N4G_w@=iWBGApz2w6vL?VYt&(yjdyIu zHn_6{46qhY593)GV4px0s2GbH;hD}VVCzU3ds5@#1o{;l9OFzW+h7OEah9>I4+CU6 z4mQTj!r#8%Tw}~X?6dD&c9m)M)CqtwX00*i<r;COpeJibSoOA4FvcuE*A_*i$tSXp zQs{S3m8q;a13q@He4<A>p!Ne&!5Fh1?Z7^$ErTp*q>;;NX!41inE{M3D^W|=D>FpD z-568RYd;%ZooB^!rd97hEf(3oU(OhRHoBcH5=~yQy;qSs7gn<e5J&f5tzV!v0evr9 zW)g{_SH>z5$W=J{fGN|dbsfGDbaTVk050rYI0Cq)PSCZ$nZ}s0#+X(1w@LV4yqK3U z-j8V20P2g%2^yJyC^UJ+_Wb&zrrdT%1ugfZQ^N}Td>*ii6Rr>8#J>k;DEFRhYzaKm zmxN9qMUDV}_v%AW2G|}oW424oyDm`%vA^#}Si=fCr7Uw7HnvZ=0-X+OY7AFNFNrO` zJjqKI;5!8fdNK4l5xH7KK31wU#%wT^VM3&<hzu8z%g|e`J9y^nVtvZ+6Hz%v1^<hB z@fwIKhUT4rX!Ic6^}M$5907J@V~$*kDvewOT!CJ-^6`mNj}A&v-u|?jtTpHYbO@@a zXn>0|w87XM>z0)E&)SE+Uc=%>kinLY@=QA^2B!#n6|GJk0j@A=vhEFZCvXI6fiw+# zOu>ah=6>{@0?OcdG?C{_5g84f<owi(G6Y8L4n73zB_e4U3Um}K8kwh|PXYrRUN3-% zbVv8=F3vWpnqI*J=$htVQ|8~Ok**dxGz07{BJ~zQ-$#7~RWRKc^M^>7spt{!_@o(& z$nJz)&}K!4W`K(FX8cQ$CiLcS1uf_~MjIGCn0gA>Lqra&lGffL;*JnO@9B9UvFY56 z;JFLfh2mGh1~oh1w@MkOM8aNEqdwoTVV)&MbsXK@TwtFE(s-MJ)hP3kurCAjpgc~V zu81k$F_AFKaIA30gzrnMUBIcd>K67v9Zi1h=MOdBTy&icj{W6^Gk|S~IVETWgQ|h= z<&>)z8+#?K>s$fd8C1e=KyMFM99X@Eo?RS7dDO&T_3FO>3~*Zs8lgf<uzm$lbM5ZC z*(CT<&^`5oF=?+s?IJW$+tW#-X@*b#g>WA~2X%*125bx5CnATVf*n_=bFWEor{1Vc z;4l#x1{?|Oi#mk91vMx0F#h)=Lt>#<>;NOc!4&@$MCk=!d*8Z6>bV>FTL;fVrx!g1 zY*B(nh@<6r`qOdhcp~u*8_GaC6v_a$fs(p_FM|F=9mh^J>NN_L4HR96YUH&5G$za% z0Ca&h#3TNCbS?21`laoR-Wu-hUo^%5vqj|3z<sEh)v7*#tO2QGQHR!{3`MR))#l!` z)C)KewMpzFOnb<;U_qQlWpDsh3ooFCBYuNw?u<oO-=C@#DJ2%61|i-=kB7HJPxS_& z3&{{z1>B4ZqMkrKnw^eLCy5TQ65tqP%w(?=0!;zki1&r-L+@aH=AZ(a%V{4DrPreR zkz3lb_aYz16AMY{A}6;sfUW4|IW_1sTFti(LFEo*xR)14Q3u!ulHbnZ+d=v*AOmbi zeqZQnU|%P%qbSF<ESLU*b3F|`rq08Ym_g+csV}wW$^f>~m*v>Ni?PFM37Oy-tjQZ& zwtaIh+Xcb;EHDG~LUjW3s`!IA;@pxj!8<rYCv-u%B**-k31Ar{7Y48mFfQi?KPQsk z`2{n;*hqP<&oQqS;DDh06`BETBm6qYMp%NQzmIMYR~OXzb0YQbn{!z%3f@;aF+fl9 zm7tA`<oAn$7+_qa9H-=%*JI@1FF6;LE@RAERFd{)9_gc!Iv4**<1c8ujb18ou}@sU z0C*8N!RVFtpvX<9&lvMMDobz9A^A29ZH#HA)z43(Fx_nI#y*sU&&5;di1&I9X$LzC zh=noc6%pAVy&$@Gz@+2O^{+!moPOxK!2R2gFm*Mk1nx!Dcw~}t`CuBl$jr?uS&*}U zx|xXdLM3=U?#`B=#;GO)j~ZjvWhg@&bM!_9HfyR7=t$WGc*_{`evLeOqK8jMqsk;% z9Z;-C4RW55ww`Ix5C-@-Gj+-G4OEGw)=5|kdRuo9s(~}v7*o&PTd5!-0(>52hS8{` zbRcTFHV%~&(HX!Ec3R6F4P}5f8LNZlp{U@bqGGiK6(qf3Lb*gK5k#abdg3?)J#}nB zucog+UEIFc@G=#}0G%iY%5bx%69uA^0XjH38K8rslL0z7IvJpYqmuzTIQ}1U+}%<$ S1(h=Z0000<MNUMnLSTX;hnoig diff --git a/static/asciidoc.css b/static/asciidoc.css deleted file mode 100644 index 4d64af2..0000000 --- a/static/asciidoc.css +++ /dev/null @@ -1,529 +0,0 @@ -/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ - -/* Default font. */ -body { - font-family: Georgia,serif; - font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, Sans-Serif; -} - -/* Title font. */ -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Arial,Helvetica,sans-serif; - font-family: Georgia, 'Times New Roman', Times, Serif; -} - -body { - margin: 1em 5% 1em 5%; -} - -a { - color: blue; - text-decoration: underline; -} -a:visited { - color: fuchsia; -} - -em { - font-style: italic; - color: navy; -} - -strong { - font-weight: bold; - color: #083194; -} - -h1, h2, h3, h4, h5, h6 { - color: #527bbd; - margin-top: 1.2em; - margin-bottom: 0.5em; - line-height: 1.3; -} - -h1, h2, h3 { - border-bottom: 2px solid silver; -} -h2 { - padding-top: 0.5em; -} -h3 { - float: left; -} -h3 + * { - clear: left; -} -h5 { - font-size: 1.0em; -} - -div.sectionbody { - margin-left: 0; -} - -hr { - border: 1px solid silver; -} - -p { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -ul, ol, li > p { - margin-top: 0; -} -ul > li { color: #aaa; } -ul > li > * { color: black; } - -.monospaced, code, pre { - font-family: "Courier New", Courier, monospace; - font-size: inherit; - color: navy; - padding: 0; - margin: 0; -} -pre { - white-space: pre-wrap; -} - -#author { - color: #527bbd; - font-weight: bold; - font-size: 1.1em; -} -#email { -} -#revnumber, #revdate, #revremark { -} - -#footer { - font-size: small; - border-top: 2px solid silver; - padding-top: 0.5em; - margin-top: 4.0em; -} -#footer-text { - float: left; - padding-bottom: 0.5em; -} -#footer-badges { - float: right; - padding-bottom: 0.5em; -} - -#preamble { - margin-top: 1.5em; - margin-bottom: 1.5em; -} -div.imageblock, div.exampleblock, div.verseblock, -div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, -div.admonitionblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.admonitionblock { - margin-top: 2.0em; - margin-bottom: 2.0em; - margin-right: 10%; - color: #606060; -} - -div.content { /* Block element content. */ - padding: 0; -} - -/* Block element titles. */ -div.title, caption.title { - color: #527bbd; - font-weight: bold; - text-align: left; - margin-top: 1.0em; - margin-bottom: 0.5em; -} -div.title + * { - margin-top: 0; -} - -td div.title:first-child { - margin-top: 0.0em; -} -div.content div.title:first-child { - margin-top: 0.0em; -} -div.content + div.title { - margin-top: 0.0em; -} - -div.sidebarblock > div.content { - background: #ffffee; - border: 1px solid #dddddd; - border-left: 4px solid #f0f0f0; - padding: 0.5em; -} - -div.listingblock > div.content { - border: 1px solid #dddddd; - border-left: 5px solid #f0f0f0; - background: #f8f8f8; - padding: 0.5em; -} - -div.quoteblock, div.verseblock { - padding-left: 1.0em; - margin-left: 1.0em; - margin-right: 10%; - border-left: 5px solid #f0f0f0; - color: #888; -} - -div.quoteblock > div.attribution { - padding-top: 0.5em; - text-align: right; -} - -div.verseblock > pre.content { - font-family: inherit; - font-size: inherit; -} -div.verseblock > div.attribution { - padding-top: 0.75em; - text-align: left; -} -/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ -div.verseblock + div.attribution { - text-align: left; -} - -div.admonitionblock .icon { - vertical-align: top; - font-size: 1.1em; - font-weight: bold; - text-decoration: underline; - color: #527bbd; - padding-right: 0.5em; -} -div.admonitionblock td.content { - padding-left: 0.5em; - border-left: 3px solid #dddddd; -} - -div.exampleblock > div.content { - border-left: 3px solid #dddddd; - padding-left: 0.5em; -} - -div.imageblock div.content { padding-left: 0; } -span.image img { border-style: none; vertical-align: text-bottom; } -a.image:visited { color: white; } - -dl { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -dt { - margin-top: 0.5em; - margin-bottom: 0; - font-style: normal; - color: navy; -} -dd > *:first-child { - margin-top: 0.1em; -} - -ul, ol { - list-style-position: outside; -} -ol.arabic { - list-style-type: decimal; -} -ol.loweralpha { - list-style-type: lower-alpha; -} -ol.upperalpha { - list-style-type: upper-alpha; -} -ol.lowerroman { - list-style-type: lower-roman; -} -ol.upperroman { - list-style-type: upper-roman; -} - -div.compact ul, div.compact ol, -div.compact p, div.compact p, -div.compact div, div.compact div { - margin-top: 0.1em; - margin-bottom: 0.1em; -} - -tfoot { - font-weight: bold; -} -td > div.verse { - white-space: pre; -} - -div.hdlist { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -div.hdlist tr { - padding-bottom: 15px; -} -dt.hdlist1.strong, td.hdlist1.strong { - font-weight: bold; -} -td.hdlist1 { - vertical-align: top; - font-style: normal; - padding-right: 0.8em; - color: navy; -} -td.hdlist2 { - vertical-align: top; -} -div.hdlist.compact tr { - margin: 0; - padding-bottom: 0; -} - -.comment { - background: yellow; -} - -.footnote, .footnoteref { - font-size: 0.8em; -} - -span.footnote, span.footnoteref { - vertical-align: super; -} - -#footnotes { - margin: 20px 0 20px 0; - padding: 7px 0 0 0; -} - -#footnotes div.footnote { - margin: 0 0 5px 0; -} - -#footnotes hr { - border: none; - border-top: 1px solid silver; - height: 1px; - text-align: left; - margin-left: 0; - width: 20%; - min-width: 100px; -} - -div.colist td { - padding-right: 0.5em; - padding-bottom: 0.3em; - vertical-align: top; -} -div.colist td img { - margin-top: 0.3em; -} - -@media print { - #footer-badges { display: none; } -} - -#toc { - margin-bottom: 2.5em; -} - -#toctitle { - color: #527bbd; - font-size: 1.1em; - font-weight: bold; - margin-top: 1.0em; - margin-bottom: 0.1em; -} - -div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { - margin-top: 0; - margin-bottom: 0; -} -div.toclevel2 { - margin-left: 2em; - font-size: 0.9em; -} -div.toclevel3 { - margin-left: 4em; - font-size: 0.9em; -} -div.toclevel4 { - margin-left: 6em; - font-size: 0.9em; -} - -span.aqua { color: aqua; } -span.black { color: black; } -span.blue { color: blue; } -span.fuchsia { color: fuchsia; } -span.gray { color: gray; } -span.green { color: green; } -span.lime { color: lime; } -span.maroon { color: maroon; } -span.navy { color: navy; } -span.olive { color: olive; } -span.purple { color: purple; } -span.red { color: red; } -span.silver { color: silver; } -span.teal { color: teal; } -span.white { color: white; } -span.yellow { color: yellow; } - -span.aqua-background { background: aqua; } -span.black-background { background: black; } -span.blue-background { background: blue; } -span.fuchsia-background { background: fuchsia; } -span.gray-background { background: gray; } -span.green-background { background: green; } -span.lime-background { background: lime; } -span.maroon-background { background: maroon; } -span.navy-background { background: navy; } -span.olive-background { background: olive; } -span.purple-background { background: purple; } -span.red-background { background: red; } -span.silver-background { background: silver; } -span.teal-background { background: teal; } -span.white-background { background: white; } -span.yellow-background { background: yellow; } - -span.big { font-size: 2em; } -span.small { font-size: 0.6em; } - -span.underline { text-decoration: underline; } -span.overline { text-decoration: overline; } -span.line-through { text-decoration: line-through; } - -div.unbreakable { page-break-inside: avoid; } - - -/* - * xhtml11 specific - * - * */ - -div.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.tableblock > table { - border: 3px solid #527bbd; -} -thead, p.table.header { - font-weight: bold; - color: #527bbd; -} -p.table { - margin-top: 0; -} -/* Because the table frame attribute is overriden by CSS in most browsers. */ -div.tableblock > table[frame="void"] { - border-style: none; -} -div.tableblock > table[frame="hsides"] { - border-left-style: none; - border-right-style: none; -} -div.tableblock > table[frame="vsides"] { - border-top-style: none; - border-bottom-style: none; -} - - -/* - * html5 specific - * - * */ - -table.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -thead, p.tableblock.header { - font-weight: bold; - color: #527bbd; -} -p.tableblock { - margin-top: 0; -} -table.tableblock { - border-width: 3px; - border-spacing: 0px; - border-style: solid; - border-color: #527bbd; - border-collapse: collapse; -} -th.tableblock, td.tableblock { - border-width: 1px; - padding: 4px; - border-style: solid; - border-color: #527bbd; -} - -table.tableblock.frame-topbot { - border-left-style: hidden; - border-right-style: hidden; -} -table.tableblock.frame-sides { - border-top-style: hidden; - border-bottom-style: hidden; -} -table.tableblock.frame-none { - border-style: hidden; -} - -th.tableblock.halign-left, td.tableblock.halign-left { - text-align: left; -} -th.tableblock.halign-center, td.tableblock.halign-center { - text-align: center; -} -th.tableblock.halign-right, td.tableblock.halign-right { - text-align: right; -} - -th.tableblock.valign-top, td.tableblock.valign-top { - vertical-align: top; -} -th.tableblock.valign-middle, td.tableblock.valign-middle { - vertical-align: middle; -} -th.tableblock.valign-bottom, td.tableblock.valign-bottom { - vertical-align: bottom; -} - - -/* - * manpage specific - * - * */ - -body.manpage h1 { - padding-top: 0.5em; - padding-bottom: 0.5em; - border-top: 2px solid silver; - border-bottom: 2px solid silver; -} -body.manpage h2 { - border-style: none; -} -body.manpage div.sectionbody { - margin-left: 3em; -} - -@media print { - body.manpage div#toc { display: none; } -} diff --git a/static/asciidoc.js b/static/asciidoc.js deleted file mode 100644 index ac36563..0000000 --- a/static/asciidoc.js +++ /dev/null @@ -1,189 +0,0 @@ -var asciidoc = { // Namespace. - -///////////////////////////////////////////////////////////////////// -// Table Of Contents generator -///////////////////////////////////////////////////////////////////// - -/* Author: Mihai Bazon, September 2002 - * http://students.infoiasi.ro/~mishoo - * - * Table Of Content generator - * Version: 0.4 - * - * Feel free to use this script under the terms of the GNU General Public - * License, as long as you do not remove or alter this notice. - */ - - /* modified by Troy D. Hanson, September 2006. License: GPL */ - /* modified by Stuart Rackham, 2006, 2009. License: GPL */ - -// toclevels = 1..4. -toc: function (toclevels) { - - function getText(el) { - var text = ""; - for (var i = el.firstChild; i != null; i = i.nextSibling) { - if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. - text += i.data; - else if (i.firstChild != null) - text += getText(i); - } - return text; - } - - function TocEntry(el, text, toclevel) { - this.element = el; - this.text = text; - this.toclevel = toclevel; - } - - function tocEntries(el, toclevels) { - var result = new Array; - var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); - // Function that scans the DOM tree for header elements (the DOM2 - // nodeIterator API would be a better technique but not supported by all - // browsers). - var iterate = function (el) { - for (var i = el.firstChild; i != null; i = i.nextSibling) { - if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { - var mo = re.exec(i.tagName); - if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { - result[result.length] = new TocEntry(i, getText(i), mo[1]-1); - } - iterate(i); - } - } - } - iterate(el); - return result; - } - - var toc = document.getElementById("toc"); - if (!toc) { - return; - } - - // Delete existing TOC entries in case we're reloading the TOC. - var tocEntriesToRemove = []; - var i; - for (i = 0; i < toc.childNodes.length; i++) { - var entry = toc.childNodes[i]; - if (entry.nodeName.toLowerCase() == 'div' - && entry.getAttribute("class") - && entry.getAttribute("class").match(/^toclevel/)) - tocEntriesToRemove.push(entry); - } - for (i = 0; i < tocEntriesToRemove.length; i++) { - toc.removeChild(tocEntriesToRemove[i]); - } - - // Rebuild TOC entries. - var entries = tocEntries(document.getElementById("content"), toclevels); - for (var i = 0; i < entries.length; ++i) { - var entry = entries[i]; - if (entry.element.id == "") - entry.element.id = "_toc_" + i; - var a = document.createElement("a"); - a.href = "#" + entry.element.id; - a.appendChild(document.createTextNode(entry.text)); - var div = document.createElement("div"); - div.appendChild(a); - div.className = "toclevel" + entry.toclevel; - toc.appendChild(div); - } - if (entries.length == 0) - toc.parentNode.removeChild(toc); -}, - - -///////////////////////////////////////////////////////////////////// -// Footnotes generator -///////////////////////////////////////////////////////////////////// - -/* Based on footnote generation code from: - * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html - */ - -footnotes: function () { - // Delete existing footnote entries in case we're reloading the footnodes. - var i; - var noteholder = document.getElementById("footnotes"); - if (!noteholder) { - return; - } - var entriesToRemove = []; - for (i = 0; i < noteholder.childNodes.length; i++) { - var entry = noteholder.childNodes[i]; - if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") - entriesToRemove.push(entry); - } - for (i = 0; i < entriesToRemove.length; i++) { - noteholder.removeChild(entriesToRemove[i]); - } - - // Rebuild footnote entries. - var cont = document.getElementById("content"); - var spans = cont.getElementsByTagName("span"); - var refs = {}; - var n = 0; - for (i=0; i<spans.length; i++) { - if (spans[i].className == "footnote") { - n++; - var note = spans[i].getAttribute("data-note"); - if (!note) { - // Use [\s\S] in place of . so multi-line matches work. - // Because JavaScript has no s (dotall) regex flag. - note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; - spans[i].innerHTML = - "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + - "' title='View footnote' class='footnote'>" + n + "</a>]"; - spans[i].setAttribute("data-note", note); - } - noteholder.innerHTML += - "<div class='footnote' id='_footnote_" + n + "'>" + - "<a href='#_footnoteref_" + n + "' title='Return to text'>" + - n + "</a>. " + note + "</div>"; - var id =spans[i].getAttribute("id"); - if (id != null) refs["#"+id] = n; - } - } - if (n == 0) - noteholder.parentNode.removeChild(noteholder); - else { - // Process footnoterefs. - for (i=0; i<spans.length; i++) { - if (spans[i].className == "footnoteref") { - var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); - href = href.match(/#.*/)[0]; // Because IE return full URL. - n = refs[href]; - spans[i].innerHTML = - "[<a href='#_footnote_" + n + - "' title='View footnote' class='footnote'>" + n + "</a>]"; - } - } - } -}, - -install: function(toclevels) { - var timerId; - - function reinstall() { - asciidoc.footnotes(); - if (toclevels) { - asciidoc.toc(toclevels); - } - } - - function reinstallAndRemoveTimer() { - clearInterval(timerId); - reinstall(); - } - - timerId = setInterval(reinstall, 500); - if (document.addEventListener) - document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); - else - window.onload = reinstallAndRemoveTimer; -} - -} diff --git a/static/logo/LICENSE.original.txt b/static/logo/LICENSE.original.txt deleted file mode 100644 index 7cb547c..0000000 --- a/static/logo/LICENSE.original.txt +++ /dev/null @@ -1,322 +0,0 @@ -Original Icon made by Freepik.com from http://www.flaticon.com/free-icon/maneki-neko_13166 -(CC BY 3.0) - -Creative Commons Legal Code - -Attribution 3.0 Unported - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR - DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY -BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND -CONDITIONS. - -1. Definitions - - a. "Adaptation" means a work based upon the Work, or upon the Work and - other pre-existing works, such as a translation, adaptation, - derivative work, arrangement of music or other alterations of a - literary or artistic work, or phonogram or performance and includes - cinematographic adaptations or any other form in which the Work may be - recast, transformed, or adapted including in any form recognizably - derived from the original, except that a work that constitutes a - Collection will not be considered an Adaptation for the purpose of - this License. For the avoidance of doubt, where the Work is a musical - work, performance or phonogram, the synchronization of the Work in - timed-relation with a moving image ("synching") will be considered an - Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as - encyclopedias and anthologies, or performances, phonograms or - broadcasts, or other works or subject matter other than works listed - in Section 1(f) below, which, by reason of the selection and - arrangement of their contents, constitute intellectual creations, in - which the Work is included in its entirety in unmodified form along - with one or more other contributions, each constituting separate and - independent works in themselves, which together are assembled into a - collective whole. A work that constitutes a Collection will not be - considered an Adaptation (as defined above) for the purposes of this - License. - c. "Distribute" means to make available to the public the original and - copies of the Work or Adaptation, as appropriate, through sale or - other transfer of ownership. - d. "Licensor" means the individual, individuals, entity or entities that - offer(s) the Work under the terms of this License. - e. "Original Author" means, in the case of a literary or artistic work, - the individual, individuals, entity or entities who created the Work - or if no individual or entity can be identified, the publisher; and in - addition (i) in the case of a performance the actors, singers, - musicians, dancers, and other persons who act, sing, deliver, declaim, - play in, interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the producer - being the person or legal entity who first fixes the sounds of a - performance or other sounds; and, (iii) in the case of broadcasts, the - organization that transmits the broadcast. - f. "Work" means the literary and/or artistic work offered under the terms - of this License including without limitation any production in the - literary, scientific and artistic domain, whatever may be the mode or - form of its expression including digital form, such as a book, - pamphlet and other writing; a lecture, address, sermon or other work - of the same nature; a dramatic or dramatico-musical work; a - choreographic work or entertainment in dumb show; a musical - composition with or without words; a cinematographic work to which are - assimilated works expressed by a process analogous to cinematography; - a work of drawing, painting, architecture, sculpture, engraving or - lithography; a photographic work to which are assimilated works - expressed by a process analogous to photography; a work of applied - art; an illustration, map, plan, sketch or three-dimensional work - relative to geography, topography, architecture or science; a - performance; a broadcast; a phonogram; a compilation of data to the - extent it is protected as a copyrightable work; or a work performed by - a variety or circus performer to the extent it is not otherwise - considered a literary or artistic work. - g. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this License with - respect to the Work, or who has received express permission from the - Licensor to exercise rights under this License despite a previous - violation. - h. "Publicly Perform" means to perform public recitations of the Work and - to communicate to the public those public recitations, by any means or - process, including by wire or wireless means or public digital - performances; to make available to the public Works in such a way that - members of the public may access these Works from a place and at a - place individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of the - performances of the Work, including by public digital performance; to - broadcast and rebroadcast the Work by any means including signs, - sounds or images. - i. "Reproduce" means to make copies of the Work by any means including - without limitation by sound or visual recordings and the right of - fixation and reproducing fixations of the Work, including storage of a - protected performance or phonogram in digital form or other electronic - medium. - -2. Fair Dealing Rights. Nothing in this License is intended to reduce, -limit, or restrict any uses free from copyright or rights arising from -limitations or exceptions that are provided for in connection with the -copyright protection under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - a. to Reproduce the Work, to incorporate the Work into one or more - Collections, and to Reproduce the Work as incorporated in the - Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, - including any translation in any medium, takes reasonable steps to - clearly label, demarcate or otherwise identify that changes were made - to the original Work. For example, a translation could be marked "The - original work was translated from English to Spanish," or a - modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated - in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: - - i. Non-waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme cannot be waived, the Licensor - reserves the exclusive right to collect such royalties for any - exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme can be waived, the Licensor waives the - exclusive right to collect such royalties for any exercise by You - of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to - collect royalties, whether individually or, in the event that the - Licensor is a member of a collecting society that administers - voluntary licensing schemes, via that society, from any exercise - by You of the rights granted under this License. - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights in -other media and formats. Subject to Section 8(f), all rights not expressly -granted by Licensor are hereby reserved. - -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: - - a. You may Distribute or Publicly Perform the Work only under the terms - of this License. You must include a copy of, or the Uniform Resource - Identifier (URI) for, this License with every copy of the Work You - Distribute or Publicly Perform. You may not offer or impose any terms - on the Work that restrict the terms of this License or the ability of - the recipient of the Work to exercise the rights granted to that - recipient under the terms of the License. You may not sublicense the - Work. You must keep intact all notices that refer to this License and - to the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or Publicly - Perform the Work, You may not impose any effective technological - measures on the Work that restrict the ability of a recipient of the - Work from You to exercise the rights granted to that recipient under - the terms of the License. This Section 4(a) applies to the Work as - incorporated in a Collection, but this does not require the Collection - apart from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any Licensor You - must, to the extent practicable, remove from the Collection any credit - as required by Section 4(b), as requested. If You create an - Adaptation, upon notice from any Licensor You must, to the extent - practicable, remove from the Adaptation any credit as required by - Section 4(b), as requested. - b. If You Distribute, or Publicly Perform the Work or any Adaptations or - Collections, You must, unless a request has been made pursuant to - Section 4(a), keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) the - name of the Original Author (or pseudonym, if applicable) if supplied, - and/or if the Original Author and/or Licensor designate another party - or parties (e.g., a sponsor institute, publishing entity, journal) for - attribution ("Attribution Parties") in Licensor's copyright notice, - terms of service or by other reasonable means, the name of such party - or parties; (ii) the title of the Work if supplied; (iii) to the - extent reasonably practicable, the URI, if any, that Licensor - specifies to be associated with the Work, unless such URI does not - refer to the copyright notice or licensing information for the Work; - and (iv) , consistent with Section 3(b), in the case of an Adaptation, - a credit identifying the use of the Work in the Adaptation (e.g., - "French translation of the Work by Original Author," or "Screenplay - based on original Work by Original Author"). The credit required by - this Section 4 (b) may be implemented in any reasonable manner; - provided, however, that in the case of a Adaptation or Collection, at - a minimum such credit will appear, if a credit for all contributing - authors of the Adaptation or Collection appears, then as part of these - credits and in a manner at least as prominent as the credits for the - other contributing authors. For the avoidance of doubt, You may only - use the credit required by this Section for the purpose of attribution - in the manner set out above and, by exercising Your rights under this - License, You may not implicitly or explicitly assert or imply any - connection with, sponsorship or endorsement by the Original Author, - Licensor and/or Attribution Parties, as appropriate, of You or Your - use of the Work, without the separate, express prior written - permission of the Original Author, Licensor and/or Attribution - Parties. - c. Except as otherwise agreed in writing by the Licensor or as may be - otherwise permitted by applicable law, if You Reproduce, Distribute or - Publicly Perform the Work either by itself or as part of any - Adaptations or Collections, You must not distort, mutilate, modify or - take other derogatory action in relation to the Work which would be - prejudicial to the Original Author's honor or reputation. Licensor - agrees that in those jurisdictions (e.g. Japan), in which any exercise - of the right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, mutilation, - modification or other derogatory action prejudicial to the Original - Author's honor and reputation, the Licensor will waive or not assert, - as appropriate, this Section, to the fullest extent permitted by the - applicable national law, to enable You to reasonably exercise Your - right under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY -KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE -LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR -ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES -ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Adaptations or Collections - from You under this License, however, will not have their licenses - terminated provided such individuals or entities remain in full - compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will - survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is - perpetual (for the duration of the applicable copyright in the Work). - Notwithstanding the above, Licensor reserves the right to release the - Work under different license terms or to stop distributing the Work at - any time; provided, however that any such election will not serve to - withdraw this License (or any other license that has been, or is - required to be, granted under the terms of this License), and this - License will continue in full force and effect unless terminated as - stated above. - -8. Miscellaneous - - a. Each time You Distribute or Publicly Perform the Work or a Collection, - the Licensor offers to the recipient a license to the Work on the same - terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor - offers to the recipient a license to the original Work on the same - terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this License, and without further action - by the parties to this agreement, such provision shall be reformed to - the minimum extent necessary to make such provision valid and - enforceable. - d. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in writing - and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with - respect to the Work licensed here. There are no understandings, - agreements or representations with respect to the Work not specified - here. Licensor shall not be bound by any additional provisions that - may appear in any communication from You. This License may not be - modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this - License were drafted utilizing the terminology of the Berne Convention - for the Protection of Literary and Artistic Works (as amended on - September 28, 1979), the Rome Convention of 1961, the WIPO Copyright - Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 - and the Universal Copyright Convention (as revised on July 24, 1971). - These rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be enforced - according to the corresponding provisions of the implementation of - those treaty provisions in the applicable national law. If the - standard suite of rights granted under applicable copyright law - includes additional rights not granted under this License, such - additional rights are deemed to be included in the License; this - License is not intended to restrict the license of any rights under - applicable law. - - -Creative Commons Notice - - Creative Commons is not a party to this License, and makes no warranty - whatsoever in connection with the Work. Creative Commons will not be - liable to You or any party on any legal theory for any damages - whatsoever, including without limitation any general, special, - incidental or consequential damages arising in connection to this - license. Notwithstanding the foregoing two (2) sentences, if Creative - Commons has expressly identified itself as the Licensor hereunder, it - shall have all rights and obligations of Licensor. - - Except for the limited purpose of indicating to the public that the - Work is licensed under the CCPL, Creative Commons does not authorize - the use by either party of the trademark "Creative Commons" or any - related trademark or logo of Creative Commons without the prior - written consent of Creative Commons. Any permitted use will be in - compliance with Creative Commons' then-current trademark usage - guidelines, as may be published on its website or otherwise made - available upon request from time to time. For the avoidance of doubt, - this trademark restriction does not form part of this License. - - Creative Commons may be contacted at http://creativecommons.org/. diff --git a/static/logo/LICENSE.txt b/static/logo/LICENSE.txt deleted file mode 100644 index 96074b8..0000000 --- a/static/logo/LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -The adaptation of icon is made by Andrey Antukh and Alejandro Gómez with same license as the original. diff --git a/static/logo/logo.png b/static/logo/logo.png deleted file mode 100644 index 9f1a8f949faea6d5a7768f1aa02b68a648f87979..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5208 zcmV-e6sPNnP)<h;3K|Lk000e1NJLTq004jh004jp1^@s6!#-il00004b3#c}2nYxW zd<bNS00009a7bBm000}W000}W0bUxB8~^|S8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H16V*vXK~#90?VWj?71fo;zlT+2iyH`tw8j{hpg0;gL{MVJjJufV zd_Y4qL1UuHn9R6FjWL=;qZ311Mx&z>HIul6pdUnn8r0~3F}NTqk!Euth=PcUG~D^) z+-Kh|>b+N0_tvXwyMLe0`E>QGyWdlHIrrRi#27;-Ixe~tU4Tv$i%tgU;OJz44vtO+ z=-}vNfDVp!&j2FQwZObZMA~&5w#&kcNEZ>AC?b=Aw?$-yh}<tCdp0Ql5h5}TcpF$Q zB6o?%*hb_X9LAV-ML=I*3SeUBBj947YfgFh1g-(rSIPfIpnK76l&Vfe7a(N^GyyMG zX?&L+2eu2G_h*4Q3G$u^Y*BPuec~7Z*aY}nf)1$A+rR|h(E#WUd=q#tMcxkrQgoYr z(iq^zn1-GLoC|!}etB`7F(3F^+M(Gp+_!<nRnmO`7z<noOpAGcLD6mYiD3X>T%>V7 z1Wt|#_Z7Pii0iO-fZthW*b&$?61NwyGjKXE8CYE<oz=h>WAgqMu+9nB0*orU?b<y9 z0Gk6VBb{(ejqu-1F;uSv769+2h%>%M-V-8W7XdwsZo~G@09Qok*9389r0CEzba$P6 z1$Z(N=etF>VJ#}P96&?{0B1QrwE+KCCr(#%xX%MCL`15+G|C0vK|8*J^F*X~PUZ1O z(HvOki@KJ!U(>Z!!gU1>0Db~2C7-XqLJNRPfW4@)(g$vj#JRBOwyfI5MHiq(=WmNH z_S}Zt%Xz;Qx;VT8Sdnw5SEDz8TY=+&eoooOM8d5EHZQtO<EUHRA)+`;L?v%7Mu^Br z;5c9e#f!4HK^J}#fEE#X1h^O2G7|2!Xhabif{t3ffj+=yz%#(3#+VQDD{=%yb6}OP zzZ>v6#eCJFX(2E;GO}F<tgRA$4RAloR9$j!>!Lfm3IiNhf{qJ8%Ye@~_4*+jPiwVk z7BIXcGQdM6=)4d##;H>p`GiX?z?I~6z*Tf-$8`RVz=jfZo-e)R)agj7pCBfs*d35B z6}^ax!$ee|(%x}1fQWQM&oO-4`b-fytA4O_5X+&ZfQa-&_wid5T^3KQLl=I_MdUc( zo<QktK*iuw0;N~F5nwFszw-eeH^wZt&!+`Uw+nEWi0l|L!7}0Wq6-iRA2`qZ1x~vc zaDJ%7O2YsmvMVq$L)1T`+r}Zl0ALV$jz1?{=>T{P_$tsJ6##7qoCN$eCagQJ=F!IE ztsu!CMX&mum2y<>pM*|u;`czMYTcdR&d!i#l-2<!*2(9bNSr@9@7@nkhTL`qr5OQ$ z6EeivTtr5R$Q`K4)@opxh)fcZt&K5P<2MJl0ADf2{8mJoMC2Cqq;WOyu87<uBKx9> zsxI7iUF?y6Eqq->`g^BR^p|hHl3fY^h0Fs6qn(lUuxOrBzSmO3TZ29PL65WZ7y%4$ z&L?FA7@b3!I|DCZwRE$lAtEz?+34CLDK-O6wa>SrBSs!L&^v{qzkd6b{Eqy-lA@>? zE4~FT$SIGveA~Vhf*=uDhOVv~jb*@ebY4FIRq_al<Bc)*0Eoz~=m}qF>|~6YpE-63 zzWy}x|C_)K=+-a9aq)gmIl2IIJ<?hXJPiB_WhjHLJ$AF{cSG+BgdPPp(vEI#Yk=KT zgdKn?Tbyf*8HAp#p9s8^G4Invq@UIEI|^Mlq`@3idby1;W;@_gU?}h@`+f`HArWaZ z#<bY54`wWDHSFXSy96UZMTs)Y7uO6d<Z#uLHmIh`-F1qn0jWGce2<32yN$vrGTw z)Ba^p39B{tuLYh(_3PiVv>N@wwz9M%dUqh}HSycf!<y63YhY>6f^H8NIOSUf^mEF$ z127DDQbZ;gW9|k{5s@XpMH$QN!fWkRb_Q4myn=o~)fiv{x<$)!h_n>A3K)o<L;N~r z{I_iR{!VoUXtC*U1N>e@{@oaJl`-aG5m^dcPj==7-^FtYrhq>Zeqoe^K0sIgBY~$; z9fT_zl=oRq{SPPI#nULg;?@2oV1TDmR(LLOIdBFlKAxVT(Wat9a}zqf7~lu!mv~;v z4!O^k<6FSb&=Da?yopX5jG?-cXgzwly)!_y+qY4A2{;s8^&SLVhTi;5(^yMT9sa(+ zDQtY_@E-J3aS-sE6zRTz-V#0lU6UMvPFuC&YyiIMw8M#HQ-yo3-7)|=>{h$Yn+Ls# z8kne;XEQplx8z)&^|U={{9cAMX8H6%p>hDDwZ6T9Sq=bpq5f*W3HUUAi?bvUVE@Y9 zL1WC%QDIUVto12Cp$uRJFjt`p9d8v`mI5#n*ax^1cveIz2Ue${cL$Qf?-o%3!~P(k zzkU8RI^1rJ?&W_$W2b~7=w;w&TmL3>t80Keoi;i*MSAzQn>7F`YF!EpwErJ(EAgE3 z+fZN<x=ky(vqI8xbf?hGVg3b?Fr)0dZm0k(NxC&{7L<kofZ@PDfaT6_KXNLv0NB-e zw+*_js%EOCz0e2fwe`ME-G-qzi=$y5aKaptF#S79&j7%lw4RVX=KOwFq%!XkG5>-d zs9b_t{VKXM(@--i>Kz=Z&;B*)vH|#<6ZX*r`CMOW2CyBt&?)fk&b$As(g>FjF}{Fa zq5co*@2`ub4^gK6LbUw04u?`-$n@V%_>l?n{6T3M0NrIwjTHEY&ih&?d4B-<R7rO@ zdeb)PJefB=i|YPWH4q7$OfqTTN3^|8Uhkspsbyw>i(?8r!TF-=HO4$(WSu;=N9_j9 z#Qy?jQffg(*q7p1EvZtzT}f}W>Pjd60d>NDsgw)={BxBK8D-z^k)lEV2UWVLm*>{N zc=W8`Zgh7MLN9+csu+4Bx^t;(?gbS$|D3kA1C!D!+M1mCYmKmb`1DgQI)Ngx9cu0* zYAOZPhVK#)ITkgik`(WvYlB}J)vife7C|+Kc5<jc`W3gJ9Ta_DhYF_Vq1U{Zq$npM zauT|O*(OcA2+lFa{LH2|5oNwOY-NmDkvW$fzWg4jWs5j&{RnIJgluwe13V8LOHKw8 zJnFp#s@?QL#(G8RHK2!0yEpO1EEjl}JBNn2u12NiJK-jIHqcUZjWIZM9a7X)(4*YD zNN4&bDSge!>xP*3x0Q+kfG^dl(Bn?ns0<)0twX1hL$Ok}6y+TP9EO!bCXCY^U6@@A zyqZI&yEK<p8xDKMy#IP>7yz}dU9Ul=JK-ni&|vQaPoQTC<5AIb+<ts?Oj+jvpN|RK z1Kp2bh$^3~$+^>`bc9ou=+yezGBLoV2`b~>n*CFQ8gLbGiIeXHs;|sH0FHFRUQT|u zdy~>kr#z=Rzb^~XZ$XZOMdUN6l&&6J!wH*($U6c0qMASz+r!sVT^V*0;3g5N-1c1t zY?^xsYh$Fnfei3lbTJ6(6~!B&^Z|aw##TM!;GSLg3Y2#e%&>pQp#rE{7=Z5e0UpV% zMCtH70AtJ=R8<YsV1+ll89+o%Ko?+1P{atZ&=|AOJ`YP6rxNaY^x&pw94#W7+vkev z`pggsdoh5B^Z~9;5yfSIMvVaO7oSvMQVG|M#xZIw^g!L>V2pVNxX=FehVKY)7U}NI z7r_8qipci%c~-(Wm2jU!*9B$3IOjQ-kHX9hAR?R4)|o@1XwLJ7ta)cZ#ZuS3sOPa- zcm&<<x$(+?kygZxv0H*5@Ywc!lk{7fTb%ew{Qrfbxme#l=vUobCESa^P#dlfZS@$+ zK<9?qwtL9|P<81nQn0B`8hQEksYX9>^6rgZEO`P|Q=5t24C?8Gi4(mRP0yEw0ltv2 z0&|=+?r3o1wV+d0O^1#sbDvLn4OV*{|ArC-9i1`WK<D|zjA>*=S5!niqnfEzYpn8d z;K!8LVD-5AL6RerK7fcULM>%x!BAt&Vi7qAHT6;ymZCZf^U*Vdf1)jemK96UHVm_f z&M^EB$8QKb*`~7z*>A*lbQ)3Q6mW2cI4(v57<G&^+cT|>iZP)Q%EABxJo9uJ==Yv! zbyOS@DxoY4;A_vnNkm52=Q~g}u|{J(s&X|8Ra<`=y{Xek;gk>d6Ok~dlo{3lArv`o zb<(>#Kzd2&CE%y1zrk32LR8!55OlZD+@Nx0r7>yyE{Gfe_)CDozXxn$)BBg48)`0a zc!qikYPBPJfwL_1<DwYg=|B}Y+@{x+e4IpnfQqZTq6bf3L<K>+rL1oc^tyHy{r)`Z z$)XtG)<6}w(MdDvY}uDy$LjZ?%9PEK_j5_9O^i+rMfoU>qjgldI+r&CoEfMBuhA-q zni#NQUaE91x?qhOf~wHNq;$=S-sxWysGK1v_0$%nEW3apiU_D4LB%@v6M@ov2UY5< zIBUKL-RazfP64|D-$w;d2cxcD62lntDr!@BO`!7n!hbuMVFc(!xJ#JF*)#_QNNXK% zNTjTbfWu<yFb3W7tp+yD&<4j)j>DqAHGB%N4G_w@=iWBGApz2w6vL?VYt&(yjdyIu zHn_6{46qhY593)GV4px0s2GbH;hD}VVCzU3ds5@#1o{;l9OFzW+h7OEah9>I4+CU6 z4mQTj!r#8%Tw}~X?6dD&c9m)M)CqtwX00*i<r;COpeJibSoOA4FvcuE*A_*i$tSXp zQs{S3m8q;a13q@He4<A>p!Ne&!5Fh1?Z7^$ErTp*q>;;NX!41inE{M3D^W|=D>FpD z-568RYd;%ZooB^!rd97hEf(3oU(OhRHoBcH5=~yQy;qSs7gn<e5J&f5tzV!v0evr9 zW)g{_SH>z5$W=J{fGN|dbsfGDbaTVk050rYI0Cq)PSCZ$nZ}s0#+X(1w@LV4yqK3U z-j8V20P2g%2^yJyC^UJ+_Wb&zrrdT%1ugfZQ^N}Td>*ii6Rr>8#J>k;DEFRhYzaKm zmxN9qMUDV}_v%AW2G|}oW424oyDm`%vA^#}Si=fCr7Uw7HnvZ=0-X+OY7AFNFNrO` zJjqKI;5!8fdNK4l5xH7KK31wU#%wT^VM3&<hzu8z%g|e`J9y^nVtvZ+6Hz%v1^<hB z@fwIKhUT4rX!Ic6^}M$5907J@V~$*kDvewOT!CJ-^6`mNj}A&v-u|?jtTpHYbO@@a zXn>0|w87XM>z0)E&)SE+Uc=%>kinLY@=QA^2B!#n6|GJk0j@A=vhEFZCvXI6fiw+# zOu>ah=6>{@0?OcdG?C{_5g84f<owi(G6Y8L4n73zB_e4U3Um}K8kwh|PXYrRUN3-% zbVv8=F3vWpnqI*J=$htVQ|8~Ok**dxGz07{BJ~zQ-$#7~RWRKc^M^>7spt{!_@o(& z$nJz)&}K!4W`K(FX8cQ$CiLcS1uf_~MjIGCn0gA>Lqra&lGffL;*JnO@9B9UvFY56 z;JFLfh2mGh1~oh1w@MkOM8aNEqdwoTVV)&MbsXK@TwtFE(s-MJ)hP3kurCAjpgc~V zu81k$F_AFKaIA30gzrnMUBIcd>K67v9Zi1h=MOdBTy&icj{W6^Gk|S~IVETWgQ|h= z<&>)z8+#?K>s$fd8C1e=KyMFM99X@Eo?RS7dDO&T_3FO>3~*Zs8lgf<uzm$lbM5ZC z*(CT<&^`5oF=?+s?IJW$+tW#-X@*b#g>WA~2X%*125bx5CnATVf*n_=bFWEor{1Vc z;4l#x1{?|Oi#mk91vMx0F#h)=Lt>#<>;NOc!4&@$MCk=!d*8Z6>bV>FTL;fVrx!g1 zY*B(nh@<6r`qOdhcp~u*8_GaC6v_a$fs(p_FM|F=9mh^J>NN_L4HR96YUH&5G$za% z0Ca&h#3TNCbS?21`laoR-Wu-hUo^%5vqj|3z<sEh)v7*#tO2QGQHR!{3`MR))#l!` z)C)KewMpzFOnb<;U_qQlWpDsh3ooFCBYuNw?u<oO-=C@#DJ2%61|i-=kB7HJPxS_& z3&{{z1>B4ZqMkrKnw^eLCy5TQ65tqP%w(?=0!;zki1&r-L+@aH=AZ(a%V{4DrPreR zkz3lb_aYz16AMY{A}6;sfUW4|IW_1sTFti(LFEo*xR)14Q3u!ulHbnZ+d=v*AOmbi zeqZQnU|%P%qbSF<ESLU*b3F|`rq08Ym_g+csV}wW$^f>~m*v>Ni?PFM37Oy-tjQZ& zwtaIh+Xcb;EHDG~LUjW3s`!IA;@pxj!8<rYCv-u%B**-k31Ar{7Y48mFfQi?KPQsk z`2{n;*hqP<&oQqS;DDh06`BETBm6qYMp%NQzmIMYR~OXzb0YQbn{!z%3f@;aF+fl9 zm7tA`<oAn$7+_qa9H-=%*JI@1FF6;LE@RAERFd{)9_gc!Iv4**<1c8ujb18ou}@sU z0C*8N!RVFtpvX<9&lvMMDobz9A^A29ZH#HA)z43(Fx_nI#y*sU&&5;di1&I9X$LzC zh=noc6%pAVy&$@Gz@+2O^{+!moPOxK!2R2gFm*Mk1nx!Dcw~}t`CuBl$jr?uS&*}U zx|xXdLM3=U?#`B=#;GO)j~ZjvWhg@&bM!_9HfyR7=t$WGc*_{`evLeOqK8jMqsk;% z9Z;-C4RW55ww`Ix5C-@-Gj+-G4OEGw)=5|kdRuo9s(~}v7*o&PTd5!-0(>52hS8{` zbRcTFHV%~&(HX!Ec3R6F4P}5f8LNZlp{U@bqGGiK6(qf3Lb*gK5k#abdg3?)J#}nB zucog+UEIFc@G=#}0G%iY%5bx%69uA^0XjH38K8rslL0z7IvJpYqmuzTIQ}1U+}%<$ S1(h=Z0000<MNUMnLSTX;hnoig diff --git a/static/logo/logo.svg b/static/logo/logo.svg deleted file mode 100644 index 58dddea..0000000 --- a/static/logo/logo.svg +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - version="1.1" - id="Capa_1" - x="0px" - y="0px" - width="64px" - height="64px" - viewBox="0 0 64 64" - enable-background="new 0 0 64 64" - xml:space="preserve" - inkscape:version="0.48.5 r10040" - sodipodi:docname="maneki.svg"><metadata - id="metadata3071"><rdf:RDF><cc:Work - rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs - id="defs3069" /><sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1918" - inkscape:window-height="1064" - id="namedview3067" - showgrid="false" - inkscape:zoom="7.660845" - inkscape:cx="44.814801" - inkscape:cy="23.685754" - inkscape:window-x="0" - inkscape:window-y="14" - inkscape:window-maximized="0" - inkscape:current-layer="layer1" /><g - id="g3049" /><g - inkscape:groupmode="layer" - id="layer2" - inkscape:label="Cat" - style="display:inline"><path - inkscape:connector-curvature="0" - d="m 49.551334,23.074752 c -0.260285,-0.411908 -0.528152,-0.817499 -0.818763,-1.205401 -0.116244,0.141515 -0.238806,0.291874 -0.386638,0.464977 -0.174366,0.203427 -0.366421,0.42707 -0.574903,0.672194 -3.014766,3.521439 -7.401719,5.201925 -11.818996,6.07502 -0.109927,0.02148 -0.22238,0.03411 -0.33357,0.0518 0.281765,0.53447 0.456132,1.132117 0.456132,1.776514 0,2.117665 -1.722183,3.839847 -3.839848,3.839847 -2.117664,0 -3.839847,-1.722182 -3.839847,-3.839847 0,-0.644397 0.174367,-1.243307 0.457396,-1.777777 -0.11119,-0.01895 -0.223644,-0.03032 -0.33357,-0.0518 C 24.388269,28.636781 20.461239,26.496373 17.450263,23.70146 17.177342,23.448755 16.92211,23.211213 16.687095,22.992623 16.481141,22.75129 16.292876,22.530174 16.1223,22.330537 c -0.03538,-0.0417 -0.05938,-0.07202 -0.0935,-0.112454 -0.08592,0.590066 -0.24765,1.214246 -0.296927,1.555398 -0.401801,2.748163 -0.827608,5.515278 -0.712628,8.301347 0.05307,1.300166 0.216063,2.605385 0.63808,3.841111 0.113717,0.332306 0.242596,0.659559 0.374003,0.986811 0.392955,0.974177 0.812445,1.940772 0.921108,2.997078 0.317144,3.108267 -2.403221,5.891808 -5.483691,5.891808 -1.300165,0 -2.5080931,-0.531943 -3.5315469,-1.339334 -0.5028823,5.827369 0.657032,11.410878 5.3257499,14.920946 0.0025,0 1.297638,0.82129 3.789306,0.82129 1.776514,0 3.723603,-0.429598 5.78441,-1.235726 0.411908,-0.160467 -0.422017,-2.401958 -0.543315,-2.644554 -0.633025,-1.247098 -1.79673,-2.324883 -3.094369,-2.860617 -0.262813,-0.108663 -0.510463,-0.209745 -0.739161,-0.305772 -0.228698,-0.113717 -0.458659,-0.127616 -0.655768,-0.178157 -0.200901,-0.0417 -0.37653,-0.07834 -0.520572,-0.109927 -0.293137,-0.06065 -0.459922,-0.09603 -0.459922,-0.09603 0,0 0.169312,-0.0051 0.46624,-0.01264 0.150359,-0.0038 0.33357,-0.0088 0.543315,-0.0139 0.209745,0.0051 0.456132,-0.03664 0.708836,0.02401 2.907367,0.689883 5.838741,2.24149 6.579166,5.401561 0.04675,0.200901 0.08718,0.377794 0.121298,0.523099 0.01011,0.04296 0.0139,0.06191 0.02274,0.09729 1.896549,0.165522 5.184236,0.424544 6.967067,0.424544 1.202875,0 2.405749,-0.08087 3.604832,-0.162994 0.760641,-0.05181 2.519466,0.18321 3.168916,-0.238806 0.370213,-0.241333 0.338625,-0.7101 0.481403,-1.137171 0.319671,-0.959014 0.875621,-1.871278 1.571823,-2.605385 1.429045,-1.499802 3.505013,-2.377951 5.572137,-2.326146 0.209745,0.0051 0.391692,0.01011 0.543315,0.0139 0.295665,0.0076 0.46624,0.01264 0.46624,0.01264 0,0 -0.168048,0.03538 -0.459922,0.09603 -0.144042,0.03032 -0.319672,0.06823 -0.520572,0.109927 -0.197109,0.0518 -0.427071,0.06444 -0.655768,0.178157 -0.229962,0.09603 -0.478876,0.197109 -0.740425,0.305772 -0.266603,0.08718 -0.518044,0.247651 -0.768222,0.41949 -0.247651,0.17563 -0.526889,0.310827 -0.759378,0.521835 -0.224907,0.213536 -0.449814,0.430862 -0.678511,0.648188 -0.228698,0.207217 -0.367686,0.496564 -0.55216,0.727789 l -0.252705,0.35505 -0.166785,0.392956 c -0.09855,0.256495 -0.240069,0.494037 -0.291874,0.717681 -0.03411,0.224907 -0.07202,0.42328 -0.11119,0.6027 -0.02274,0.08845 -0.0417,0.17184 -0.06191,0.251442 0,0.116244 0,0.227434 0.0025,0.331043 0,0.207217 0,0.387901 0.0025,0.536997 2.060806,0.806128 4.007895,1.235726 5.784409,1.235726 2.508094,0 3.805732,-0.833926 3.817104,-0.844034 11.451311,-8.600802 1.7285,-29.730701 -1.676696,-36.275752 z M 32.230958,53.205991 c -4.510778,0 -8.18005,-3.668008 -8.18005,-8.18005 0,-4.509514 3.670535,-8.180049 8.18005,-8.180049 4.509514,0 8.180049,3.669271 8.180049,8.180049 0,4.512042 -3.670535,8.18005 -8.180049,8.18005 z" - id="path3051" /><path - inkscape:connector-curvature="0" - d="m 16.45208,21.959061 c 0.216062,0.149096 0.456132,0.313354 0.717681,0.492774 0.270394,0.152887 0.562268,0.318408 0.874358,0.495301 5.209506,2.954118 10.980017,4.418541 16.980489,3.799415 1.723445,-0.178157 3.434256,-0.549633 5.08189,-1.087894 2.798704,-0.913527 5.459684,-2.048171 7.904602,-3.703386 0.189528,-0.12888 0.35505,-0.238806 0.510463,-0.341152 -0.707573,-0.902155 -1.485903,-1.747452 -2.415856,-2.481559 -0.86425,-0.681039 -1.748717,-1.341862 -2.394377,-2.244018 -1.782831,-2.491667 -0.972913,-6.086391 1.435362,-7.8490061 -0.02274,-0.04928 -0.04296,-0.09729 -0.0657,-0.146569 -1.545289,-3.432992 -3.41783,-5.431886 -5.051566,-5.431886 -0.630498,0 -1.274895,0.2855563 -1.915501,0.8478241 -1.666587,1.4618959 -3.757718,2.2680239 -5.884228,2.2680239 -2.126509,0 -4.216377,-0.806128 -5.882964,-2.2680239 -0.640609,-0.5622678 -1.285006,-0.8478241 -1.915504,-0.8478241 -1.657742,0 -3.486061,1.948353 -5.014924,5.344703 -1.743662,3.8764901 -3.348336,7.4459431 -3.348336,11.9832551 0,0.104872 -0.03159,0.20469 -0.08087,0.296928 0.06823,0.160467 0.09097,0.371475 0.08213,0.616599 0.123826,0.08213 0.24007,0.160467 0.382848,0.256495 z m 7.507855,-1.460633 c -0.290611,0.137724 -0.68483,0.289347 -1.094211,0.371476 -0.406855,0.08971 -0.828872,0.11119 -1.15107,0.101082 -0.322198,-0.01011 -0.547106,-0.06697 -0.547106,-0.06697 0,0 0.183211,-0.142778 0.473822,-0.281765 0.29061,-0.138988 0.684829,-0.289347 1.094211,-0.371476 0.406854,-0.08971 0.828871,-0.108663 1.151069,-0.101082 0.322199,0.01011 0.547106,0.0657 0.547106,0.0657 0,0 -0.184474,0.144042 -0.473821,0.283029 z m 18.787327,0.472558 c -0.320935,0.01011 -0.742952,-0.01137 -1.149806,-0.101082 -0.409382,-0.08213 -0.804865,-0.235015 -1.094211,-0.371476 -0.289347,-0.138987 -0.473822,-0.280502 -0.473822,-0.280502 0,0 0.226171,-0.0556 0.547106,-0.0657 0.320935,-0.0088 0.745479,0.01137 1.152333,0.101082 0.408118,0.08213 0.802337,0.232488 1.092948,0.371476 0.29061,0.138987 0.473821,0.281765 0.473821,0.281765 0,0 -0.226171,0.05433 -0.548369,0.06444 z m 1.301429,-2.10882 c 0.49151,0.07581 0.817499,0.176893 0.817499,0.176893 0,0 -0.327252,0.101082 -0.817499,0.176893 -0.490247,0.07455 -1.142225,0.142778 -1.797994,0.138988 -0.653241,0.0038 -1.306483,-0.06191 -1.797993,-0.137724 -0.490247,-0.07581 -0.816236,-0.178157 -0.816236,-0.178157 0,0 0.327252,-0.102345 0.816236,-0.178157 0.49151,-0.07581 1.143488,-0.141514 1.797993,-0.137724 0.654505,-0.0038 1.307747,0.06444 1.797994,0.138988 z m -4.413487,-0.977967 c 0,0 0.199637,-0.09982 0.488984,-0.189529 0.289346,-0.08845 0.665876,-0.183211 1.038616,-0.241333 0.372739,-0.06318 0.748005,-0.09224 1.017136,-0.142778 0.131406,-0.02906 0.246387,-0.0518 0.305772,-0.09097 0.07202,-0.02906 0.0935,-0.108663 0.09603,-0.09729 -0.01264,0.0051 0.0417,0.04296 0.01011,0.156677 -0.03411,0.104873 -0.113717,0.250178 -0.251441,0.347469 -0.264076,0.216062 -0.663349,0.387902 -1.073994,0.449814 -0.408118,0.07076 -0.822554,0.03664 -1.128327,-0.02653 -0.304509,-0.06065 -0.502882,-0.165521 -0.502882,-0.165521 z M 37.782879,7.3021919 c 0.395483,-0.702519 1.024717,-1.556661 1.880123,-1.671642 0.814972,-0.108663 1.584458,0.392956 2.079759,0.999447 0.202164,0.246387 0.862986,1.272368 1.095474,1.900339 0.495302,1.3267 -0.772012,0.82129 -1.458105,0.48772 -0.883203,-0.429598 -1.693121,-0.569849 -2.640764,-0.770749 -0.68483,-0.144042 -1.260996,-0.403064 -0.956487,-0.945115 z M 35.945716,14.94019 c 0.523099,-0.746743 1.303956,-1.244571 2.202321,-1.402511 0.895838,-0.162995 1.799257,0.0417 2.547263,0.563531 0.214799,0.150359 0.266603,0.446024 0.117508,0.659559 -0.151623,0.214799 -0.447288,0.266604 -0.659559,0.117508 -1.110637,-0.780857 -2.650872,-0.506673 -3.427939,0.605228 -0.09097,0.131406 -0.238806,0.202163 -0.389165,0.202163 -0.0935,0 -0.188265,-0.02653 -0.271658,-0.08466 -0.217326,-0.151623 -0.26913,-0.447287 -0.118771,-0.660822 z m -6.167257,6.005526 c 0.627971,-0.233752 1.2193,-0.57364 1.704493,-1.037353 0.515518,-0.492774 0.763168,-1.052515 1.028508,-1.696912 0.01516,-0.0417 0.02653,-0.06697 0.03791,-0.09603 -0.576167,-0.02527 -1.038616,-0.521835 -1.038616,-0.818763 0,-0.304509 0.483929,-0.552159 1.081576,-0.552159 0.597646,0 1.081575,0.24765 1.081575,0.552159 0,0.296928 -0.462449,0.793493 -1.038616,0.818763 0.01137,0.02906 0.02274,0.05433 0.03791,0.09603 0.04928,0.118771 0.09476,0.319672 0.192056,0.504146 0.622917,1.178867 1.576877,1.755034 2.738054,2.310984 0,0 -0.07328,0.02022 -0.205954,0.04043 -0.130143,0.0013 -0.336097,0.08086 -0.566058,0.03285 -0.228698,-0.04422 -0.523099,-0.05686 -0.789702,-0.20469 -0.645661,-0.358841 -1.286267,-0.951433 -1.449261,-1.700703 0.06823,0.310827 -0.422017,0.900892 -0.610282,1.106847 -0.457396,0.500355 -0.985548,0.675985 -1.628682,0.798546 -0.231224,0.04801 -0.437179,-0.03159 -0.566058,-0.03285 -0.133933,-0.02022 -0.205954,-0.04043 -0.205954,-0.04043 0,0 0.07328,-0.03411 0.197109,-0.08086 z M 28.497247,14.94019 c 0.149095,0.213535 0.09729,0.509199 -0.117508,0.659559 -0.08213,0.05686 -0.178157,0.08466 -0.271657,0.08466 -0.149096,0 -0.295665,-0.07076 -0.389166,-0.202164 -0.777066,-1.1119 -2.313511,-1.386085 -3.427938,-0.605228 -0.214799,0.146569 -0.507936,0.09855 -0.659559,-0.117507 -0.149096,-0.214799 -0.09729,-0.5092 0.117507,-0.659559 0.745479,-0.523099 1.648898,-0.726526 2.547263,-0.563532 0.897102,0.157941 1.677959,0.657032 2.201058,1.403775 z m -3.671799,2.944009 c 0,0 -0.197109,0.104872 -0.502882,0.165521 -0.304509,0.06191 -0.718945,0.09729 -1.127063,0.02653 -0.408118,-0.06191 -0.809918,-0.233752 -1.073994,-0.449814 -0.137725,-0.09729 -0.217326,-0.242596 -0.252705,-0.347469 -0.03285,-0.113717 0.02274,-0.151623 0.01011,-0.156677 0.0038,-0.01011 0.02527,0.06823 0.09729,0.09729 0.05939,0.03917 0.174367,0.06191 0.305773,0.09097 0.267867,0.05054 0.643133,0.0796 1.015873,0.142778 0.374003,0.05812 0.750532,0.152887 1.039879,0.241333 0.289347,0.09097 0.48772,0.189529 0.48772,0.189529 z M 21.62368,8.5303359 c 0.235016,-0.627971 0.893311,-1.653952 1.095475,-1.900339 0.496565,-0.606491 1.267314,-1.10811 2.081023,-0.999447 0.856669,0.114981 1.48464,0.967859 1.880122,1.671642 0.304509,0.542051 -0.270394,0.79981 -0.95775,0.945115 -0.947643,0.2009 -1.757561,0.341151 -2.642027,0.770749 -0.68483,0.334834 -1.952144,0.83898 -1.456843,-0.48772 z M 20.413225,18.862166 c 0.490247,-0.07455 1.143489,-0.141515 1.797994,-0.138988 0.653241,-0.0038 1.307746,0.06191 1.797993,0.137724 0.490247,0.07581 0.8175,0.178157 0.8175,0.178157 0,0 -0.327253,0.101082 -0.8175,0.178157 -0.490247,0.07581 -1.143488,0.141514 -1.797993,0.137724 -0.653242,0.0038 -1.307747,-0.06444 -1.797994,-0.138988 -0.490247,-0.07581 -0.817499,-0.176893 -0.817499,-0.176893 0,0 0.327252,-0.101082 0.817499,-0.176893 z" - id="path3059" /><path - inkscape:connector-curvature="0" - d="m 44.691824,16.186023 c 1.423991,1.991313 3.741292,3.19166 5.196871,5.195608 1.97615,2.724156 3.310431,6.015634 4.445075,9.168125 0.07834,0.216062 0.155413,0.430861 0.231225,0.651978 0.02148,0.05938 0.0417,0.130143 0.07076,0.221116 0.03917,0.121298 0.131406,0.184475 0.170576,0.109927 0.02274,-0.03917 0.04422,-0.08718 0.06444,-0.138988 0.03411,-0.08845 0.06949,-0.181947 0.106136,-0.283029 0.03664,-0.102345 0.06949,-0.193319 0.09729,-0.266603 0.413173,-1.075259 0.716418,-2.347627 0.952697,-4.002842 0.13646,-0.961541 0.223644,-1.930664 0.289347,-2.751954 0.193319,-2.413329 0.343678,-5.965093 -0.596383,-8.930582 -0.529416,-1.672905 -1.619837,-3.368553 -2.777224,-4.317459 -2.016583,-1.6552151 -5.095789,-2.3779511 -7.203346,-0.615336 -1.747453,1.473268 -2.46387,3.982626 -1.047461,5.960039 z" - id="path3061" /><path - inkscape:connector-curvature="0" - d="m 32.230958,28.333536 c -0.808655,0 -1.521282,0.381584 -1.995103,0.966595 -0.357577,0.442233 -0.582484,0.998183 -0.582484,1.609729 0,1.4202 1.156123,2.576324 2.576323,2.576324 1.420201,0 2.576324,-1.156124 2.576324,-2.576324 0,-0.611546 -0.223643,-1.166232 -0.58122,-1.608465 -0.471295,-0.585012 -1.185185,-0.967859 -1.99384,-0.967859 z" - id="path3063" /><path - inkscape:connector-curvature="0" - d="m 11.46369,44.52685 c 1.175077,0 2.328673,-0.533207 3.167653,-1.461897 0.793492,-0.876885 1.168759,-1.957197 1.058832,-3.038773 -0.08086,-0.793493 -0.4018,-1.584458 -0.742951,-2.422174 l -0.0935,-0.229961 c -0.140251,-0.348733 -0.277975,-0.697465 -0.39801,-1.051252 -0.411909,-1.210455 -0.636816,-2.543472 -0.703782,-4.197424 -0.112454,-2.740582 0.272921,-5.441994 0.655768,-8.058751 0.0076,-0.05307 0.01516,-0.106136 0.02274,-0.159204 l 0.04675,-0.318408 c 0.02401,-0.168048 0.07202,-0.396746 0.128879,-0.657032 0.0088,-0.03791 0.01769,-0.08213 0.0278,-0.130143 0.01516,-0.07202 -0.07329,-0.05812 -0.193319,0.03917 -0.07202,0.05812 -0.144042,0.118772 -0.216063,0.178157 -0.463713,0.381584 -0.914791,0.814973 -1.350706,1.285003 -1.070204,1.153597 -2.049434,2.500513 -2.874515,3.705914 -1.3001654,1.901602 -3.1019496,4.763483 -3.7248665,7.650633 -0.3499959,1.619837 -0.2514411,3.516385 0.2514411,4.832976 0.1301429,0.339888 0.3032456,0.675985 0.4965646,1.007028 0.1528864,0.262813 0.3247255,0.516781 0.5129905,0.763169 0.1756297,0.229961 0.3638947,0.446023 0.5660584,0.653241 0.9198449,0.940061 2.0898679,1.609729 3.3622349,1.609729 z" - id="path3065" /></g><g - inkscape:groupmode="layer" - id="layer1" - inkscape:label="Lambda" - style="display:inline"><g - transform="matrix(0.01899666,0,0,0.01435939,25.385925,37.314762)" - inkscape:label="Layer 1" - id="layer1-2" - style="fill:#000000"><path - id="flowRoot1306" - d="m 354.22852,625.15545 0.21093,0 c 0,0.61719 -0.10157,1.06641 -0.30468,1.34766 -0.19923,0.28125 -0.44923,0.42187 -0.75,0.42188 -0.2461,-10e-6 -0.48243,-0.0918 -0.70899,-0.2754 -0.22657,-0.1875 -0.42969,-0.68554 -0.60937,-1.49414 l -0.50391,-2.27343 -1.74609,3.96093 -1.10743,0 2.50782,-5.40234 c -0.13282,-0.69921 -0.29297,-1.21679 -0.48047,-1.55273 -0.1875,-0.33593 -0.41993,-0.5039 -0.69727,-0.50391 -0.22266,10e-6 -0.41797,0.0859 -0.58594,0.25781 -0.16406,0.16798 -0.25586,0.4297 -0.27539,0.78516 l -0.21093,0 c 0.0117,-0.57421 0.12695,-1.0332 0.3457,-1.37695 0.21875,-0.34765 0.49219,-0.52148 0.82031,-0.52149 0.21094,10e-6 0.41016,0.0879 0.59766,0.26367 0.1914,0.17189 0.35546,0.46876 0.49219,0.89063 0.14062,0.41797 0.35742,1.28711 0.65039,2.60742 l 0.41601,1.85742 c 0.16797,0.76953 0.34375,1.28516 0.52735,1.54688 0.18749,0.25781 0.41015,0.38672 0.66797,0.38672 0.43749,0 0.68554,-0.3086 0.74414,-0.92579" - transform="matrix(104.6563,0,0,104.6563,-36414.11,-64667.67)" - inkscape:connector-curvature="0" - style="fill:#000000" /></g></g><g - inkscape:groupmode="layer" - id="layer3" - inkscape:label="Cats" /></svg> \ No newline at end of file diff --git a/static/logo/original.svg b/static/logo/original.svg deleted file mode 100644 index c74fb15..0000000 --- a/static/logo/original.svg +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve"> -<g> - <path d="M42.787,24.803c-0.206-0.326-0.418-0.647-0.648-0.954c-0.092,0.112-0.189,0.231-0.306,0.368 - c-0.138,0.161-0.29,0.338-0.455,0.532c-2.386,2.787-5.858,4.117-9.354,4.808c-0.087,0.017-0.176,0.027-0.264,0.041 - c0.223,0.423,0.361,0.896,0.361,1.406c0,1.676-1.363,3.039-3.039,3.039s-3.039-1.363-3.039-3.039c0-0.51,0.138-0.984,0.362-1.407 - c-0.088-0.015-0.177-0.024-0.264-0.041c-3.269-0.351-6.377-2.045-8.76-4.257c-0.216-0.2-0.418-0.388-0.604-0.561 - c-0.163-0.191-0.312-0.366-0.447-0.524c-0.028-0.033-0.047-0.057-0.074-0.089c-0.068,0.467-0.196,0.961-0.235,1.231 - c-0.318,2.175-0.655,4.365-0.564,6.57c0.042,1.029,0.171,2.062,0.505,3.04c0.09,0.263,0.192,0.522,0.296,0.781 - c0.311,0.771,0.643,1.536,0.729,2.372c0.251,2.46-1.902,4.663-4.34,4.663c-1.029,0-1.985-0.421-2.795-1.06 - c-0.398,4.612,0.52,9.031,4.215,11.809c0.002,0,1.027,0.65,2.999,0.65c1.406,0,2.947-0.34,4.578-0.978 - c0.326-0.127-0.334-1.901-0.43-2.093c-0.501-0.987-1.422-1.84-2.449-2.264c-0.208-0.086-0.404-0.166-0.585-0.242 - c-0.181-0.09-0.363-0.101-0.519-0.141c-0.159-0.033-0.298-0.062-0.412-0.087c-0.232-0.048-0.364-0.076-0.364-0.076 - s0.134-0.004,0.369-0.01c0.119-0.003,0.264-0.007,0.43-0.011c0.166,0.004,0.361-0.029,0.561,0.019 - c2.301,0.546,4.621,1.774,5.207,4.275c0.037,0.159,0.069,0.299,0.096,0.414c0.008,0.034,0.011,0.049,0.018,0.077 - c1.501,0.131,4.103,0.336,5.514,0.336c0.952,0,1.904-0.064,2.853-0.129c0.602-0.041,1.994,0.145,2.508-0.189 - c0.293-0.191,0.268-0.562,0.381-0.9c0.253-0.759,0.693-1.481,1.244-2.062c1.131-1.187,2.774-1.882,4.41-1.841 - c0.166,0.004,0.31,0.008,0.43,0.011c0.234,0.006,0.369,0.01,0.369,0.01s-0.133,0.028-0.364,0.076 - c-0.114,0.024-0.253,0.054-0.412,0.087c-0.156,0.041-0.338,0.051-0.519,0.141c-0.182,0.076-0.379,0.156-0.586,0.242 - c-0.211,0.069-0.41,0.196-0.608,0.332c-0.196,0.139-0.417,0.246-0.601,0.413c-0.178,0.169-0.356,0.341-0.537,0.513 - c-0.181,0.164-0.291,0.393-0.437,0.576l-0.2,0.281l-0.132,0.311c-0.078,0.203-0.19,0.391-0.231,0.568 - c-0.027,0.178-0.057,0.335-0.088,0.477c-0.018,0.07-0.033,0.136-0.049,0.199c0,0.092,0,0.18,0.002,0.262 - c0,0.164,0,0.307,0.002,0.425c1.631,0.638,3.172,0.978,4.578,0.978c1.985,0,3.012-0.66,3.021-0.668 - C53.177,46.706,45.482,29.983,42.787,24.803z M29.079,48.65c-3.57,0-6.474-2.903-6.474-6.474c0-3.569,2.905-6.474,6.474-6.474 - s6.474,2.904,6.474,6.474C35.553,45.747,32.648,48.65,29.079,48.65z"/> - <path d="M29.079,36.703c-3.019,0-5.474,2.455-5.474,5.474s2.456,5.474,5.474,5.474c3.019,0,5.474-2.455,5.474-5.474 - S32.098,36.703,29.079,36.703z M29.109,39.314c0.774,0.166,1.352-0.157,1.861-0.697c0.208-0.221,0.627-0.266,0.901-0.133 - c0.26,0.125,0.322,0.527,0.083,0.777c-0.136,0.143-0.331,0.273-0.52,0.312c-0.52,0.109-0.97,0.351-1.415,0.619 - c-0.062,0.037-0.129,0.066-0.197,0.095c-0.112,0.045-0.496,0.063-0.737-0.159c-0.145-0.134-0.237-0.314-0.252-0.523 - C28.819,39.416,28.897,39.27,29.109,39.314z M27.393,38.43c0.309,0.109,0.62,0.232,0.897,0.403c0.075,0.046,0.13,0.123,0.181,0.207 - c0.079,0.131,0.138,0.446-0.019,0.61c-0.091,0.095-0.215,0.137-0.377,0.127c-0.594-0.037-1.018-0.484-1.02-1.076 - C27.054,38.464,27.172,38.352,27.393,38.43z M32.777,44.782c-0.545,0.698-2.208,1.333-3.293,0.796 - c-0.824-0.407-1.132-1.487-0.609-2.244c0.023-0.034,0.034-0.076,0.043-0.12c0.013-0.069-0.032-0.138-0.1-0.151 - c-0.041-0.008-0.082-0.018-0.122-0.029c-0.162-0.049-0.324-0.098-0.481-0.161c-0.099-0.039-0.196-0.081-0.293-0.124 - c-0.161-0.071-0.294-0.133-0.297-0.137c-0.004-0.004,0.118-0.117,0.138-0.299c0.019-0.18-0.328-0.242-0.378-0.088 - c-0.02,0.063,0.027,0.133,0.134,0.248c0.019,0.02,0.036,0.043,0.052,0.065c0.026,0.039,0.048,0.073,0.053,0.076 - c0.005,0.002,0.246,0.176,0.37,0.489c0.072,0.183,0.097,0.385,0.084,0.602c-0.005,0.085-0.009,0.171-0.028,0.253 - c-0.097,0.421-0.066,0.838,0.011,1.259c0.051,0.279-0.071,0.504-0.32,0.639c-0.201,0.11-0.415,0.148-0.611-0.015 - c-0.227-0.188-0.321-0.655-0.215-0.942c0.087-0.235,0.213-0.479,0.214-0.719c0.001-0.428-0.075-0.857-0.138-1.283 - c-0.006-0.041-0.173-0.107-0.228-0.082c-0.143,0.065-0.263,0.182-0.397,0.27c-0.276,0.18-0.555,0.357-0.836,0.531 - c-0.054,0.033-0.126,0.061-0.187,0.056c-0.095-0.008-0.252-0.026-0.267-0.075c-0.03-0.088-0.001-0.238,0.064-0.294 - c0.394-0.338,0.83-0.63,1.202-0.989c0.214-0.205,0.415-0.426,0.613-0.649c0.327-0.37,0.577-0.685,0.561-0.702 - s-0.178,0.033-0.361,0.111c-0.111,0.047-0.222,0.093-0.335,0.133c-0.584,0.21-1.032,0.014-1.241-0.533 - c-0.109-0.285-0.018-0.591,0.231-0.75c0.239-0.152,0.418-0.038,0.604,0.128c0.297,0.265,0.647,0.282,1.007,0.146 - c0.203-0.077,0.397-0.176,0.598-0.258c0.288-0.119,0.465-0.074,0.633,0.187c0.1,0.155,0.152,0.343,0.244,0.505 - c0.056,0.1,0.133,0.208,0.229,0.252c0.048,0.021,0.158-0.092,0.24-0.142c0.173-0.106,0.337-0.246,0.525-0.302 - c0.098-0.029,0.32,0.07,0.344,0.153c0.04,0.136,0.004,0.33-0.074,0.452c-0.151,0.236-0.128,0.439,0.133,0.5 - c0.196,0.046,0.407,0.072,0.605,0.05c0.383-0.042,0.539-0.354,0.372-0.702c-0.061-0.127-0.147-0.242-0.217-0.365 - c-0.133-0.23-0.06-0.385,0.203-0.36c0.658,0.062,1.264,0.478,1.006,1.319c-0.134,0.439-0.463,0.703-0.898,0.828 - c-0.163,0.049-0.332,0.076-0.5,0.104c-0.337,0.058-0.588,0.334-0.654,0.672c-0.017,0.086-0.049,0.17-0.086,0.253 - c-0.06,0.135,0.019,0.406,0.184,0.344c0.064-0.023,0.097-0.113,0.128-0.281c0.034-0.182,0.085-0.368,0.166-0.534 - c0.034-0.07,0.168-0.127,0.253-0.124c0.067,0.003,0.158,0.097,0.188,0.171c0.048,0.12,0.079,0.257,0.072,0.385 - c-0.013,0.255,0.117,0.312,0.332,0.298c0.112-0.009,0.23-0.022,0.337,0.002c0.081,0.02,0.209,0.096,0.209,0.146 - c0,0.082-0.071,0.189-0.143,0.238c-0.114,0.08-0.25,0.15-0.385,0.171c-0.201,0.028-0.245,0.14-0.294,0.313 - c-0.048,0.17-0.146,0.354-0.278,0.465c-0.215,0.182-0.436,0.098-0.487-0.217c-0.052-0.326-0.205-0.395-0.488-0.367 - c-0.049,0.006-0.099-0.002-0.15-0.011c-0.082-0.016-0.21,0.207-0.055,0.413c0.085,0.114,0.219,0.201,0.39,0.239 - c0.742,0.165,1.429,0.05,1.983-0.517c0.465-0.475,0.282-1.215-0.352-1.447c-0.142-0.051-0.299-0.066-0.431-0.135 - c-0.077-0.039-0.155-0.146-0.16-0.229c-0.004-0.057,0.111-0.127,0.18-0.182c0.026-0.021,0.071-0.023,0.108-0.028 - c0.44-0.067,1.29,0.325,1.51,0.694C33.206,43.598,33.129,44.333,32.777,44.782z"/> - <path d="M29.916,42.617c0.028-0.001,0.055-0.006,0.083-0.012c0.045-0.008,0.08-0.035,0.077-0.058s-0.164-0.099-0.36-0.17 - c-0.196-0.071-0.281-0.004-0.368,0.093c-0.044,0.049-0.122,0.075-0.206,0.105c-0.076,0.027-0.128,0.145-0.168,0.23 - c-0.013,0.029,0.055,0.133,0.064,0.129c0.079-0.021,0.185-0.043,0.218-0.101C29.415,42.555,29.675,42.625,29.916,42.617z"/> - <path d="M28.297,41.455c-0.212,0.168-0.18,0.345,0.049,0.262c0.151-0.055,0.285-0.146,0.342-0.263 - c0.021-0.043,0.02-0.097,0.014-0.151C28.692,41.219,28.509,41.287,28.297,41.455z"/> - <path d="M16.591,23.92c0.171,0.118,0.361,0.248,0.568,0.39c0.214,0.121,0.445,0.252,0.692,0.392 - c4.123,2.338,8.69,3.497,13.439,3.007c1.364-0.141,2.718-0.435,4.022-0.861c2.215-0.723,4.321-1.621,6.256-2.931 - c0.15-0.102,0.281-0.189,0.404-0.27c-0.56-0.714-1.176-1.383-1.912-1.964c-0.684-0.539-1.384-1.062-1.895-1.776 - c-1.411-1.972-0.77-4.817,1.136-6.212c-0.018-0.039-0.034-0.077-0.052-0.116c-1.223-2.717-2.705-4.299-3.998-4.299 - c-0.499,0-1.009,0.226-1.516,0.671c-1.319,1.157-2.974,1.795-4.657,1.795s-3.337-0.638-4.656-1.795 - c-0.507-0.445-1.017-0.671-1.516-0.671c-1.312,0-2.759,1.542-3.969,4.23c-1.38,3.068-2.65,5.893-2.65,9.484 - c0,0.083-0.025,0.162-0.064,0.235c0.054,0.127,0.072,0.294,0.065,0.488C16.386,23.782,16.478,23.844,16.591,23.92z M22.533,22.764 - c-0.23,0.109-0.542,0.229-0.866,0.294c-0.322,0.071-0.656,0.088-0.911,0.08c-0.255-0.008-0.433-0.053-0.433-0.053 - s0.145-0.113,0.375-0.223c0.23-0.11,0.542-0.229,0.866-0.294c0.322-0.071,0.656-0.086,0.911-0.08 - c0.255,0.008,0.433,0.052,0.433,0.052S22.762,22.654,22.533,22.764z M37.402,23.138c-0.254,0.008-0.588-0.009-0.91-0.08 - c-0.324-0.065-0.637-0.186-0.866-0.294c-0.229-0.11-0.375-0.222-0.375-0.222s0.179-0.044,0.433-0.052 - c0.254-0.007,0.59,0.009,0.912,0.08c0.323,0.065,0.635,0.184,0.865,0.294c0.23,0.11,0.375,0.223,0.375,0.223 - S37.657,23.13,37.402,23.138z M38.432,21.469c0.389,0.06,0.647,0.14,0.647,0.14s-0.259,0.08-0.647,0.14 - c-0.388,0.059-0.904,0.113-1.423,0.11c-0.517,0.003-1.034-0.049-1.423-0.109c-0.388-0.06-0.646-0.141-0.646-0.141 - s0.259-0.081,0.646-0.141c0.389-0.06,0.905-0.112,1.423-0.109C37.527,21.356,38.044,21.41,38.432,21.469z M34.939,20.695 - c0,0,0.158-0.079,0.387-0.15c0.229-0.07,0.527-0.145,0.822-0.191c0.295-0.05,0.592-0.073,0.805-0.113 - c0.104-0.023,0.195-0.041,0.242-0.072c0.057-0.023,0.074-0.086,0.076-0.077c-0.01,0.004,0.033,0.034,0.008,0.124 - c-0.027,0.083-0.09,0.198-0.199,0.275c-0.209,0.171-0.525,0.307-0.85,0.356c-0.323,0.056-0.651,0.029-0.893-0.021 - C35.096,20.778,34.939,20.695,34.939,20.695z M33.473,12.32c0.313-0.556,0.811-1.232,1.488-1.323 - c0.645-0.086,1.254,0.311,1.646,0.791c0.16,0.195,0.683,1.007,0.867,1.504c0.392,1.05-0.611,0.65-1.154,0.386 - c-0.699-0.34-1.34-0.451-2.09-0.61C33.688,12.954,33.232,12.749,33.473,12.32z M32.019,18.365c0.414-0.591,1.032-0.985,1.743-1.11 - c0.709-0.129,1.424,0.033,2.016,0.446c0.17,0.119,0.211,0.353,0.093,0.522c-0.12,0.17-0.354,0.211-0.522,0.093 - c-0.879-0.618-2.098-0.401-2.713,0.479c-0.072,0.104-0.189,0.16-0.308,0.16c-0.074,0-0.149-0.021-0.215-0.067 - C31.941,18.768,31.9,18.534,32.019,18.365z M27.138,23.118c0.497-0.185,0.965-0.454,1.349-0.821 - c0.408-0.39,0.604-0.833,0.814-1.343c0.012-0.033,0.021-0.053,0.03-0.076c-0.456-0.02-0.822-0.413-0.822-0.648 - c0-0.241,0.383-0.437,0.856-0.437c0.473,0,0.856,0.196,0.856,0.437c0,0.235-0.366,0.628-0.822,0.648 - c0.009,0.023,0.018,0.043,0.03,0.076c0.039,0.094,0.075,0.253,0.152,0.399c0.493,0.933,1.248,1.389,2.167,1.829 - c0,0-0.058,0.016-0.163,0.032c-0.103,0.001-0.266,0.064-0.448,0.026c-0.181-0.035-0.414-0.045-0.625-0.162 - c-0.511-0.284-1.018-0.753-1.147-1.346c0.054,0.246-0.334,0.713-0.483,0.876c-0.362,0.396-0.78,0.535-1.289,0.632 - c-0.183,0.038-0.346-0.025-0.448-0.026c-0.106-0.016-0.163-0.032-0.163-0.032S27.04,23.155,27.138,23.118z M26.124,18.365 - c0.118,0.169,0.077,0.403-0.093,0.522c-0.065,0.045-0.141,0.067-0.215,0.067c-0.118,0-0.234-0.056-0.308-0.16 - c-0.615-0.88-1.831-1.097-2.713-0.479c-0.17,0.116-0.402,0.078-0.522-0.093c-0.118-0.17-0.077-0.403,0.093-0.522 - c0.59-0.414,1.305-0.575,2.016-0.446C25.092,17.379,25.71,17.774,26.124,18.365z M23.218,20.695c0,0-0.156,0.083-0.398,0.131 - c-0.241,0.049-0.569,0.077-0.892,0.021c-0.323-0.049-0.641-0.185-0.85-0.356c-0.109-0.077-0.172-0.192-0.2-0.275 - c-0.026-0.09,0.018-0.12,0.008-0.124c0.003-0.008,0.02,0.054,0.077,0.077c0.047,0.031,0.138,0.049,0.242,0.072 - c0.212,0.04,0.509,0.063,0.804,0.113c0.296,0.046,0.594,0.121,0.823,0.191C23.061,20.617,23.218,20.695,23.218,20.695z - M20.684,13.292c0.186-0.497,0.707-1.309,0.867-1.504c0.393-0.48,1.003-0.877,1.647-0.791c0.678,0.091,1.175,0.766,1.488,1.323 - c0.241,0.429-0.214,0.633-0.758,0.748c-0.75,0.159-1.391,0.27-2.091,0.61C21.295,13.943,20.292,14.342,20.684,13.292z - M19.726,21.469c0.388-0.059,0.905-0.112,1.423-0.11c0.517-0.003,1.035,0.049,1.423,0.109c0.388,0.06,0.647,0.141,0.647,0.141 - s-0.259,0.08-0.647,0.141c-0.388,0.06-0.905,0.112-1.423,0.109c-0.517,0.003-1.035-0.051-1.423-0.11 - c-0.388-0.06-0.647-0.14-0.647-0.14S19.338,21.529,19.726,21.469z"/> - <path d="M38.941,19.351c1.127,1.576,2.961,2.526,4.113,4.112c1.564,2.156,2.62,4.761,3.518,7.256 - c0.062,0.171,0.123,0.341,0.183,0.516c0.017,0.047,0.033,0.103,0.056,0.175c0.031,0.096,0.104,0.146,0.135,0.087 - c0.018-0.031,0.035-0.069,0.051-0.11c0.027-0.07,0.055-0.144,0.084-0.224c0.029-0.081,0.055-0.153,0.077-0.211 - c0.327-0.851,0.567-1.858,0.754-3.168c0.108-0.761,0.177-1.528,0.229-2.178c0.153-1.91,0.272-4.721-0.472-7.068 - c-0.419-1.324-1.282-2.666-2.198-3.417c-1.596-1.31-4.033-1.882-5.701-0.487C38.387,15.8,37.82,17.786,38.941,19.351z"/> - <path d="M29.079,28.965c-0.64,0-1.204,0.302-1.579,0.765c-0.283,0.35-0.461,0.79-0.461,1.274c0,1.124,0.915,2.039,2.039,2.039 - s2.039-0.915,2.039-2.039c0-0.484-0.177-0.923-0.46-1.273C30.284,29.268,29.719,28.965,29.079,28.965z"/> - <path d="M12.643,41.781c0.93,0,1.843-0.422,2.507-1.157c0.628-0.694,0.925-1.549,0.838-2.405c-0.064-0.628-0.318-1.254-0.588-1.917 - l-0.074-0.182c-0.111-0.276-0.22-0.552-0.315-0.832c-0.326-0.958-0.504-2.013-0.557-3.322c-0.089-2.169,0.216-4.307,0.519-6.378 - c0.006-0.042,0.012-0.084,0.018-0.126l0.037-0.252c0.019-0.133,0.057-0.314,0.102-0.52c0.007-0.03,0.014-0.065,0.022-0.103 - c0.012-0.057-0.058-0.046-0.153,0.031c-0.057,0.046-0.114,0.094-0.171,0.141c-0.367,0.302-0.724,0.645-1.069,1.017 - c-0.847,0.913-1.622,1.979-2.275,2.933c-1.029,1.505-2.455,3.77-2.948,6.055c-0.277,1.282-0.199,2.783,0.199,3.825 - c0.103,0.269,0.24,0.535,0.393,0.797c0.121,0.208,0.257,0.409,0.406,0.604c0.139,0.182,0.288,0.353,0.448,0.517 - C10.71,41.251,11.636,41.781,12.643,41.781z"/> -</g> -</svg> diff --git a/static/niwi.css b/static/niwi.css deleted file mode 100644 index 08005bf..0000000 --- a/static/niwi.css +++ /dev/null @@ -1,607 +0,0 @@ -@import url("https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Anonymous+Pro:400,700"); - -/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ - -/* Default font. */ -body { - font-family: Georgia,serif; -} - -/* Title font. */ -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Arial,Helvetica,sans-serif; -} - -body { - margin: 1em 5% 1em 5%; -} - -a { - color: blue; - text-decoration: underline; -} -a:visited { - color: fuchsia; -} - -em { - font-style: italic; - color: navy; -} - -strong { - font-weight: bold; - color: #083194; -} - -h1, h2, h3, h4, h5, h6 { - color: #527bbd; - margin-top: 1.2em; - margin-bottom: 0.5em; - line-height: 1.3; -} - -h1, h2, h3 { - border-bottom: 2px solid silver; -} -h2 { - padding-top: 0.5em; -} -h3 { - float: left; -} -h3 + * { - clear: left; -} -h5 { - font-size: 1.0em; -} - -div.sectionbody { - margin-left: 0; -} - -hr { - border: 1px solid silver; -} - -p { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -ul, ol, li > p { - margin-top: 0; -} -ul > li { color: #aaa; } -ul > li > * { color: black; } - -pre { - padding: 0; - margin: 0; - font-size: 14px; -} - -#author { - color: #527bbd; - font-weight: bold; - font-size: 1.1em; -} -#email { -} -#revnumber, #revdate, #revremark { -} - -#footer { - font-size: small; - border-top: 2px solid silver; - padding-top: 0.5em; - margin-top: 4.0em; -} -#footer-text { - float: left; - padding-bottom: 0.5em; -} -#footer-badges { - float: right; - padding-bottom: 0.5em; -} - -#preamble { - margin-top: 1.5em; - margin-bottom: 1.5em; -} -div.imageblock, div.exampleblock, div.verseblock, -div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, -div.admonitionblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.admonitionblock { - margin-top: 2.0em; - margin-bottom: 2.0em; - margin-right: 10%; - color: #606060; -} - -div.content { /* Block element content. */ - padding: 0; -} - -/* Block element titles. */ -div.title, caption.title { - color: #527bbd; - font-weight: bold; - text-align: left; - margin-top: 1.0em; - margin-bottom: 0.5em; -} -div.title + * { - margin-top: 0; -} - -td div.title:first-child { - margin-top: 0.0em; -} -div.content div.title:first-child { - margin-top: 0.0em; -} -div.content + div.title { - margin-top: 0.0em; -} - -div.sidebarblock > div.content { - background: #ffffee; - border: 1px solid #dddddd; - border-left: 4px solid #f0f0f0; - padding: 0.5em; -} - -div.listingblock > div.content { - border: 1px solid #dddddd; - border-left: 5px solid #f0f0f0; - background: #f8f8f8; - padding: 0.5em; -} - -div.quoteblock, div.verseblock { - padding-left: 1.0em; - margin-left: 1.0em; - margin-right: 10%; - border-left: 5px solid #f0f0f0; - color: #777777; -} - -div.quoteblock > div.attribution { - padding-top: 0.5em; - text-align: right; -} - -div.verseblock > pre.content { - font-family: inherit; - font-size: inherit; -} -div.verseblock > div.attribution { - padding-top: 0.75em; - text-align: left; -} -/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ -div.verseblock + div.attribution { - text-align: left; -} - -div.admonitionblock .icon { - vertical-align: top; - font-size: 1.1em; - font-weight: bold; - text-decoration: underline; - color: #527bbd; - padding-right: 0.5em; -} -div.admonitionblock td.content { - padding-left: 0.5em; - border-left: 3px solid #dddddd; -} - -div.exampleblock > div.content { - border-left: 3px solid #dddddd; - padding-left: 0.5em; -} - -div.imageblock div.content { padding-left: 0; } -span.image img { border-style: none; } -a.image:visited { color: white; } - -dl { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -dt { - margin-top: 0.5em; - margin-bottom: 0; - font-style: normal; - color: navy; -} -dd > *:first-child { - margin-top: 0.1em; -} - -ul, ol { - list-style-position: outside; -} -ol.arabic { - list-style-type: decimal; -} -ol.loweralpha { - list-style-type: lower-alpha; -} -ol.upperalpha { - list-style-type: upper-alpha; -} -ol.lowerroman { - list-style-type: lower-roman; -} -ol.upperroman { - list-style-type: upper-roman; -} - -div.compact ul, div.compact ol, -div.compact p, div.compact p, -div.compact div, div.compact div { - margin-top: 0.1em; - margin-bottom: 0.1em; -} - -tfoot { - font-weight: bold; -} -td > div.verse { - white-space: pre; -} - -div.hdlist { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -div.hdlist tr { - padding-bottom: 15px; -} -dt.hdlist1.strong, td.hdlist1.strong { - font-weight: bold; -} -td.hdlist1 { - vertical-align: top; - font-style: normal; - padding-right: 0.8em; - color: navy; -} -td.hdlist2 { - vertical-align: top; -} -div.hdlist.compact tr { - margin: 0; - padding-bottom: 0; -} - -.comment { - background: yellow; -} - -.footnote, .footnoteref { - font-size: 0.8em; -} - -span.footnote, span.footnoteref { - vertical-align: super; -} - -#footnotes { - margin: 20px 0 20px 0; - padding: 7px 0 0 0; -} - -#footnotes div.footnote { - margin: 0 0 5px 0; -} - -#footnotes hr { - border: none; - border-top: 1px solid silver; - height: 1px; - text-align: left; - margin-left: 0; - width: 20%; - min-width: 100px; -} - -div.colist td { - padding-right: 0.5em; - padding-bottom: 0.3em; - vertical-align: top; -} -div.colist td img { - margin-top: 0.3em; -} - -@media print { - #footer-badges { display: none; } -} - -#toc { - margin-bottom: 2.5em; -} - -#toctitle { - color: #527bbd; - font-size: 1.1em; - font-weight: bold; - margin-top: 1.0em; - margin-bottom: 0.1em; -} - -div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { - margin-top: 0; - margin-bottom: 0; -} -div.toclevel2 { - margin-left: 2em; - font-size: 0.9em; -} -div.toclevel3 { - margin-left: 4em; - font-size: 0.9em; -} -div.toclevel4 { - margin-left: 6em; - font-size: 0.9em; -} - -span.aqua { color: aqua; } -span.black { color: black; } -span.blue { color: blue; } -span.fuchsia { color: fuchsia; } -span.gray { color: gray; } -span.green { color: green; } -span.lime { color: lime; } -span.maroon { color: maroon; } -span.navy { color: navy; } -span.olive { color: olive; } -span.purple { color: purple; } -span.red { color: red; } -span.silver { color: silver; } -span.teal { color: teal; } -span.white { color: white; } -span.yellow { color: yellow; } - -span.aqua-background { background: aqua; } -span.black-background { background: black; } -span.blue-background { background: blue; } -span.fuchsia-background { background: fuchsia; } -span.gray-background { background: gray; } -span.green-background { background: green; } -span.lime-background { background: lime; } -span.maroon-background { background: maroon; } -span.navy-background { background: navy; } -span.olive-background { background: olive; } -span.purple-background { background: purple; } -span.red-background { background: red; } -span.silver-background { background: silver; } -span.teal-background { background: teal; } -span.white-background { background: white; } -span.yellow-background { background: yellow; } - -span.big { font-size: 2em; } -span.small { font-size: 0.6em; } - -span.underline { text-decoration: underline; } -span.overline { text-decoration: overline; } -span.line-through { text-decoration: line-through; } - - -/* - * xhtml11 specific - * - * */ - -tt { - font-family: monospace; - font-size: inherit; - color: navy; -} - -div.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.tableblock > table { - border: 3px solid #527bbd; -} -thead, p.table.header { - font-weight: bold; - color: #527bbd; -} -p.table { - margin-top: 0; -} -/* Because the table frame attribute is overriden by CSS in most browsers. */ -div.tableblock > table[frame="void"] { - border-style: none; -} -div.tableblock > table[frame="hsides"] { - border-left-style: none; - border-right-style: none; -} -div.tableblock > table[frame="vsides"] { - border-top-style: none; - border-bottom-style: none; -} - - -/* - * html5 specific - * - * */ - -.monospaced { - font-family: monospace; - font-size: inherit; - color: navy; -} - -table.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -thead, p.tableblock.header { - font-weight: bold; - color: #527bbd; -} -p.tableblock { - margin-top: 0; -} -table.tableblock { - border-width: 3px; - border-spacing: 0px; - border-style: solid; - border-color: #527bbd; - border-collapse: collapse; -} -th.tableblock, td.tableblock { - border-width: 1px; - padding: 4px; - border-style: solid; - border-color: #527bbd; -} - -table.tableblock.frame-topbot { - border-left-style: hidden; - border-right-style: hidden; -} -table.tableblock.frame-sides { - border-top-style: hidden; - border-bottom-style: hidden; -} -table.tableblock.frame-none { - border-style: hidden; -} - -th.tableblock.halign-left, td.tableblock.halign-left { - text-align: left; -} -th.tableblock.halign-center, td.tableblock.halign-center { - text-align: center; -} -th.tableblock.halign-right, td.tableblock.halign-right { - text-align: right; -} - -th.tableblock.valign-top, td.tableblock.valign-top { - vertical-align: top; -} -th.tableblock.valign-middle, td.tableblock.valign-middle { - vertical-align: middle; -} -th.tableblock.valign-bottom, td.tableblock.valign-bottom { - vertical-align: bottom; -} - - -/* - * manpage specific - * - * */ - -body.manpage h1 { - padding-top: 0.5em; - padding-bottom: 0.5em; - border-top: 2px solid silver; - border-bottom: 2px solid silver; -} -body.manpage h2 { - border-style: none; -} -body.manpage div.sectionbody { - margin-left: 3em; -} - -@media print { - body.manpage div#toc { display: none; } -} - - -/* - * Theme specific overrides of the preceding (asciidoc.css) CSS. - * - */ -body { - font-family: Garamond, Georgia, serif; - font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif; - font-size: 19px; - color: #3E4349; - line-height: 1.3em; -} -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Garmond, Georgia, serif; - font-family: "Roboto Slab","ff-tisa-web-pro","Georgia",Arial,sans-serif; - border-bottom-width: 0; - color: #3E4349; -} -div.title, caption.title { color: #596673; font-weight: normal; font-size:14px; } -h1 { font-size: 240%; } -h2 { font-size: 180%; } -h3 { font-size: 150%; } -h4 { font-size: 130%; } -h5 { font-size: 115%; } -h6 { font-size: 100%; } -#header h1 { margin-top: 0; } -#toc { - color: #444444; - line-height: 1.5; - padding-top: 1.5em; -} -#toctitle { - font-size: 20px; -} -#toc a { - border-bottom: 1px dotted #999999; - color: #444444 !important; - text-decoration: none !important; -} -#toc a:hover { - border-bottom: 1px solid #6D4100; - color: #6D4100 !important; - text-decoration: none !important; -} -div.toclevel1 { margin-top: 0.2em; font-size: 16px; } -div.toclevel2 { margin-top: 0.15em; font-size: 14px; } -em, dt, td.hdlist1 { color: black; } -strong { color: #3E4349; } -a { color: #004B6B; text-decoration: none; border-bottom: 1px dotted #004B6B; } -a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; } -a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; } -div.tableblock > table, table.tableblock { border: 3px solid #E8E8E8; } -th.tableblock, td.tableblock { border: 1px solid #E8E8E8; } -ul > li > * { color: #3E4349; } -pre { - font-family: "Anonymous Pro", Consolas,Menlo,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; - font-size: 16px; -} -tt, .monospaced { - color: black; - font-family: 'Deja Vu Sans Mono', monospace; - font-size: 16px; -} -div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock > div.content { border-width: 0 0 0 3px; border-color: #E8E8E8; } -div.verseblock { border-left-width: 0; margin-left: 3em; } -div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;} -div.admonitionblock td.content { border-left: 3px solid #E8E8E8; } diff --git a/static/pygments.css b/static/pygments.css deleted file mode 100644 index fdd056f..0000000 --- a/static/pygments.css +++ /dev/null @@ -1,205 +0,0 @@ -.hll { -background-color:#eee; -} -.c { -color:#408090; -font-style:italic; -} -.err { -border:1px solid #FF0000; -} -.k { -color:#007020; -font-weight:bold; -} -.o { -color:#666666; -} -.cm { -color:#408090; -font-style:italic; -} -.cp { -color:#007020; -} -.c1 { -color:#408090; -font-style:italic; -} -.cs { -background-color:#FFF0F0; -color:#408090; -} -.gd { -color:#A00000; -} -.ge { -font-style:italic; -} -.gr { -color:#FF0000; -} -.gh { -color:#000080; -font-weight:bold; -} -.gi { -color:#00A000; -} -.go { -color:#303030; -} -.gp { -color:#C65D09; -font-weight:bold; -} -.gs { -font-weight:bold; -} -.gu { -color:#800080; -font-weight:bold; -} -.gt { -color:#0040D0; -} -.kc { -color:#007020; -font-weight:bold; -} -.kd { -color:#007020; -font-weight:bold; -} -.kn { -color:#007020; -font-weight:bold; -} -.kp { -color:#007020; -} -.kr { -color:#007020; -font-weight:bold; -} -.kt { -color:#902000; -} -.m { -color:#208050; -} -.s { -color:#4070A0; -} -.na { -color:#4070A0; -} -.nb { -color:#007020; -} -.nc { -color:#0E84B5; -font-weight:bold; -} -.no { -color:#60ADD5; -} -.nd { -color:#555555; -font-weight:bold; -} -.ni { -color:#D55537; -font-weight:bold; -} -.ne { -color:#007020; -} -.nf { -color:#06287E; -} -.nl { -color:#002070; -font-weight:bold; -} -.nn { -color:#0E84B5; -font-weight:bold; -} -.nt { -color:#062873; -font-weight:bold; -} -.nv { -color:#BB60D5; -} -.ow { -color:#007020; -font-weight:bold; -} -.w { -color:#BBBBBB; -} -.mf { -color:#208050; -} -.mh { -color:#208050; -} -.mi { -color:#208050; -} -.mo { -color:#208050; -} -.sb { -color:#4070A0; -} -.sc { -color:#4070A0; -} -.sd { -color:#4070A0; -font-style:italic; -} -.s2 { -color:#4070A0; -} -.se { -color:#4070A0; -font-weight:bold; -} -.sh { -color:#4070A0; -} -.si { -color:#70A0D0; -font-style:italic; -} -.sx { -color:#C65D09; -} -.sr { -color:#235388; -} -.s1 { -color:#4070A0; -} -.ss { -color:#517918; -} -.bp { -color:#007020; -} -.vc { -color:#BB60D5; -} -.vg { -color:#BB60D5; -} -.vi { -color:#BB60D5; -} -.il { -color:#208050; -} From b3d1c548278f8f68911427283b64817c5a56f81a Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Sun, 2 Aug 2015 11:52:05 +0200 Subject: [PATCH 41/52] Generate documentation --- latest/api/cats.applicative.validation.html | 2 +- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 + latest/api/cats.core.html | 39 ++- latest/api/cats.data.html | 2 +- latest/api/cats.monad.either.html | 4 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.html | 2 +- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 6 +- latest/api/cats.protocols.html | 2 +- latest/api/index.html | 2 +- latest/api/user.html | 2 + latest/index.html | 307 +++++++++++++++++--- 14 files changed, 319 insertions(+), 57 deletions(-) create mode 100644 latest/api/cats.context.html create mode 100644 latest/api/user.html diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html index 7083c80..97999ce 100644 --- a/latest/api/cats.applicative.validation.html +++ b/latest/api/cats.applicative.validation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L179">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L105">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L118">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L112">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L172">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L124">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L196">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L102">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L115">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L97">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L109">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L189">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L121">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index 4c313f6..59bb1af 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L188">view source</a></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L47">view source</a></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L141">view source</a></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L94">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L220">view source</a></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L47">view source</a></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L173">view source</a></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L111">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html new file mode 100644 index 0000000..c4daa92 --- /dev/null +++ b/latest/api/cats.context.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L34">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L50">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index afa4195..52a1780 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,12 +1,29 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fmap alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L366">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fapply alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L370">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L410">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L425">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L396">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L402">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L388">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fmap alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L427">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fapply alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L431">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L471">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L486">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L457">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L463">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L449">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L374">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context <code>mv</code> and any function, applies a function to value of mv.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L435">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context <code>mv</code> and any function, applies a function to value of mv.</p> <pre><code>(bind (either/right 1) (fn [v] (return (inc v)))) ;; => #<Right [2]> -</code></pre><p>For convenience, you may prefer use a <code>mlet</code> macro that add a beautiful, let like syntax for compose operations with <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L117">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L419">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s context and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p><p>This function is variadic, so it can be used like a haskell style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L176">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> +</code></pre><p>For convenience, you may prefer use a <code>mlet</code> macro that add a beautiful, let like syntax for compose operations with <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L95">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function yields another which is curried.</p><p>With inferred arity (function must have one fixed arity)</p> +<pre><code>(defn add2 [x y] (+ x y)) +(def cadd2 (curry add2)) + +((cadd2 1) 3) +;; => 4 + +(cadd2 1 3) +;; => 4 +</code></pre><p>With fixed arity:</p> +<pre><code>(def c+ (curry 3 +)) + +((c+ 1 2) 3) +;; => 6 + +((((c+) 1) 2) 3) +;; => 6 +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L253">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L236">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Is a composition of curry and lift-m macros.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L331">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L480">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s context and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p><p>This function is variadic, so it can be used like a haskell style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L145">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> <pre><code>(require '[cats.monad.moaybe :as maybe]) (require '[cats.core :as m]) @@ -15,7 +32,7 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L341">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L166">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>Let se a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L402">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L135">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L495">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L488">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>Let se a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> </code></pre><p>Yet an other example that fails:</p> @@ -25,7 +42,7 @@ (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L321">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L154">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is same as that <code>(bind mv identity)</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L160">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L203">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L382">view source</a></div></div><div class="public anchor" id="var-get-current-context"><h3><a href="#var-get-current-context">get-current-context</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-current-context)</code><code>(get-current-context default)</code></div><div class="doc"><div class="markdown"><p>Alias to cats.context/get-current for backward compatibility.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L50">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L123">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is same as that <code>(bind mv identity)</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L129">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L172">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> <pre><code>(def monad+ (lift-m 2 +)) (monad+ (maybe/just 1) (maybe/just 2)) @@ -36,7 +53,7 @@ (monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6] -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L252">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L87">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L295">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L65">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -49,7 +66,7 @@ (maybe/nothing))) [1 2]) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L300">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L82">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L361">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L60">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) @@ -61,14 +78,14 @@ b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L214">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L148">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L141">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> -<pre><code>(with-monad either/either-monad +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L183">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L117">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L111">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +<pre><code>(with-context either/either-monad (pure 1) ;; => #<Right [1]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L93">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure and it works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L111">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L71">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure and it works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L89">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> <pre><code>(sequence [(maybe/just 2) (maybe/just 3)]) ;; => <Just [[2, 3]]> (sequence [(maybe/nothing) (maybe/just 3)]) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L279">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L196">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L188">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L42">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L340">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L165">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L157">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><h4 class="deprecated">deprecated</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Alias to <code>with-context</code> for backward compatibility.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index 031f069..8cce83a 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L72">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L76">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L72">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L76">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index 52c6248..baf4061 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) @@ -7,4 +7,4 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L205">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L215">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L223">view source</a></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L172">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L129">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L242">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L246">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L250">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L107">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L117">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L234">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L112">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L123">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L238">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L217">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L227">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L235">view source</a></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L184">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L129">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L254">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L258">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L262">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L107">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L117">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L246">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L112">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L123">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L250">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index 1f2c3ea..43b6590 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L66">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L72">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L177">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L185">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L148">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L171">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L140">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L165">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L237">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L255">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.html b/latest/api/cats.monad.html index 5180ab5..0269780 100644 --- a/latest/api/cats.monad.html +++ b/latest/api/cats.monad.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index d4785da..3a4fe75 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L67">view source</a></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L101">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L67">view source</a></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L101">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index 6a6d4fc..7246903 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,10 +1,10 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]> -</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L297">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> +</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L313">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> <pre><code>(from-maybe (just 1)) ;=> 1 @@ -13,4 +13,4 @@ (from-maybe (nothing) 42) ;=> 42 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L134">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L107">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L120">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L303">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L269">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L287">view source</a></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L217">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L99">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L115">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L126">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L279">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L133">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L106">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L119">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L319">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L280">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L298">view source</a></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L228">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L98">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L114">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L125">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L290">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index bb2c603..c0aef43 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L63">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L34">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L54">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L59">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L72">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"><code>(ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"><code>(local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L94">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L113">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L100">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L77">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L50">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L63">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L34">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L54">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L72">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L59">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L77">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L50">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 8fad8cc..da1ff07 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.5.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.protocols.html#var-MonadState">MonadState</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.6.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li></ul></div></div><div class="namespace"><h3><a href="user.html">user</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/user.html b/latest/api/user.html new file mode 100644 index 0000000..d1c93a5 --- /dev/null +++ b/latest/api/user.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>user documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1 current"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">user</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index d23c5a5..4b48003 100644 --- a/latest/index.html +++ b/latest/index.html @@ -80,7 +80,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.5.0</span> +<span id="revdate">0.6.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -99,10 +99,11 @@ <h1>Cats Documentation</h1> <li><a href="#_monoid">5.2. Monoid</a></li> <li><a href="#_functor">5.3. Functor</a></li> <li><a href="#_applicative">5.4. Applicative</a></li> -<li><a href="#_monad">5.5. Monad</a></li> -<li><a href="#_monadzero">5.6. MonadZero</a></li> -<li><a href="#_monadplus">5.7. MonadPlus</a></li> -<li><a href="#_monad_transformers">5.8. Monad Transformers</a></li> +<li><a href="#_foldable">5.5. Foldable</a></li> +<li><a href="#_monad">5.6. Monad</a></li> +<li><a href="#_monadzero">5.7. MonadZero</a></li> +<li><a href="#_monadplus">5.8. MonadPlus</a></li> +<li><a href="#_monad_transformers">5.9. Monad Transformers</a></li> </ul> </li> <li><a href="#_types">6. Types</a> @@ -115,19 +116,25 @@ <h1>Cats Documentation</h1> <li><a href="#_complementary_libraries">6.6. Complementary libraries</a></li> </ul> </li> -<li><a href="#_faq">7. FAQ</a> +<li><a href="#_higher_order_functions">7. Higher-order functions</a> <ul class="sectlevel2"> -<li><a href="#_what_clojure_types_implement_some_of_the_category_theory_abstractions">7.1. What Clojure types implement some of the Category Theory abstractions?</a></li> -<li><a href="#_where_are_the_state_reader_writer_and_continuation_monads">7.2. Where are the State, Reader, Writer and Continuation monads?</a></li> +<li><a href="#_curry">7.1. curry</a></li> +<li><a href="#_lift_m">7.2. lift-m</a></li> </ul> </li> -<li><a href="#_developers_guide">8. Developers Guide</a> +<li><a href="#_faq">8. FAQ</a> <ul class="sectlevel2"> -<li><a href="#_philosophy">8.1. Philosophy</a></li> -<li><a href="#_contributing">8.2. Contributing</a></li> -<li><a href="#_source_code">8.3. Source Code</a></li> -<li><a href="#_run_tests">8.4. Run tests</a></li> -<li><a href="#_license">8.5. License</a></li> +<li><a href="#_what_clojure_types_implement_some_of_the_category_theory_abstractions">8.1. What Clojure types implement some of the Category Theory abstractions?</a></li> +<li><a href="#_where_are_the_state_reader_writer_and_continuation_monads">8.2. Where are the State, Reader, Writer and Continuation monads?</a></li> +</ul> +</li> +<li><a href="#_developers_guide">9. Developers Guide</a> +<ul class="sectlevel2"> +<li><a href="#_philosophy">9.1. Philosophy</a></li> +<li><a href="#_contributing">9.2. Contributing</a></li> +<li><a href="#_source_code">9.3. Source Code</a></li> +<li><a href="#_run_tests">9.4. Run tests</a></li> +<li><a href="#_license">9.5. License</a></li> </ul> </li> </ul> @@ -223,7 +230,7 @@ <h3 id="_leiningen">4.1. Leiningen</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"0.5.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"0.6.0"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> @@ -491,7 +498,82 @@ <h3 id="_applicative">5.4. Applicative</h3> </div> </div> <div class="sect2"> -<h3 id="_monad">5.5. Monad</h3> +<h3 id="_foldable">5.5. Foldable</h3> +<div class="paragraph"> +<p>The <strong>Foldable</strong> is a generic abstraction for data structures that can be folded. It consists +mainly on two functions: <code>foldl</code> and <code>foldr</code>. <code>foldl</code> is also known as <code>reduce</code> or <code>inject</code> +in other mainstream programming languages.</p> +</div> +<div class="paragraph"> +<p>Both function have an identical signature and differ in how they traverse the data structure. +Let’s look at a little example using <code>foldl</code>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">foldl</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 15</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>You can observe that <code>foldl</code> is identical to the clojure <code>reduce</code> function:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">reduce </span><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 15</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>And the same operation can be done using <code>foldr</code>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">foldr</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span> <span class="tok-nv">wc</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">v</span> <span class="tok-nv">wc</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 15</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The main difference between <code>foldl</code> and <code>reduce</code> is that <code>foldl</code> has a fixed arity so all +parameters are mandatory and <code>foldl</code> is a generic abstraction that can work with other +types apart from collections.</p> +</div> +<div class="paragraph"> +<p>As we said previously, the <code>foldl</code> and <code>foldr</code> differ mainly on how they traverse the +data structure. Then, for understanding better how they work internally, let’s see a +graphical representation of the <code>foldl</code> execution model:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">((((acc⊕1)⊕2)⊕3)⊕4)⊕5</code></pre> +</div> +</div> +<div class="paragraph"> +<p>In contrast to the <code>foldr</code> internal execution model:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">1⊕(2⊕(3⊕(4⊕(5⊕(wc)))))</code></pre> +</div> +</div> +<div class="paragraph"> +<p>In languages with strict argument evaluation, <code>foldr</code> does not have many +applications because when the data structure to fold grows it tends to consume all the +stack (causing the well known stack overflow). In case of Clojure, the unique obvious +case of using foldr is for small datastructures or lazy sequences.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/foldr</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">cons </span><span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">%1</span><span class="tok-p">)</span> <span class="tok-nv">%2</span><span class="tok-p">)</span> <span class="tok-o">'</span><span class="tok-p">()</span> <span class="tok-p">(</span><span class="tok-nb">into </span><span class="tok-p">[]</span> <span class="tok-p">(</span><span class="tok-nb">range </span><span class="tok-mi">100000</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => StackOverflowError</span> + +<span class="tok-c1">;; The same operation but using lazyseqs works as expected</span> +<span class="tok-p">(</span><span class="tok-nf">m/foldr</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">cons </span><span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">%1</span><span class="tok-p">)</span> <span class="tok-nv">%2</span><span class="tok-p">)</span> <span class="tok-o">'</span><span class="tok-p">()</span> <span class="tok-p">(</span><span class="tok-nb">map identity </span><span class="tok-p">(</span><span class="tok-nb">range </span><span class="tok-mi">100000</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => (1 2 3 4 ...)</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_monad">5.6. Monad</h3> <div class="paragraph"> <p>Monads are the most discussed programming concept to come from category theory. Like functors and applicatives, monads deal with data in contexts.</p> @@ -592,7 +674,7 @@ <h3 id="_monad">5.5. Monad</h3> </div> </div> <div class="sect2"> -<h3 id="_monadzero">5.6. MonadZero</h3> +<h3 id="_monadzero">5.7. MonadZero</h3> <div class="paragraph"> <p>Some monads also have the notion of an identity element analogous to that of Monoid. When calling <code>bind</code> on a identity element for a monad, the same value is returned. This means that whenever we encounter the identity element in a monadic composition it will @@ -677,7 +759,7 @@ <h3 id="_monadzero">5.6. MonadZero</h3> </div> </div> <div class="sect2"> -<h3 id="_monadplus">5.7. MonadPlus</h3> +<h3 id="_monadplus">5.8. MonadPlus</h3> <div class="paragraph"> <p>MonadPlus is a complementary abstraction for Monads that support an associative binary operation, analogous to that of a Semigroup. If the monad implements the MonadZero and MonadPlus protocols it forms a monoid.</p> @@ -702,9 +784,9 @@ <h3 id="_monadplus">5.7. MonadPlus</h3> </div> </div> <div class="sect2"> -<h3 id="_monad_transformers">5.8. Monad Transformers</h3> +<h3 id="_monad_transformers">5.9. Monad Transformers</h3> <div class="sect3"> -<h4 id="_motivation">5.8.1. Motivation</h4> +<h4 id="_motivation">5.9.1. Motivation</h4> <div class="paragraph"> <p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> @@ -738,7 +820,7 @@ <h4 id="_motivation">5.8.1. Motivation</h4> </div> </div> <div class="sect3"> -<h4 id="_using_monad_transformers">5.8.2. Using monad transformers</h4> +<h4 id="_using_monad_transformers">5.9.2. Using monad transformers</h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad since we want the resulting type to be a stateful computation @@ -1194,10 +1276,169 @@ <h3 id="_complementary_libraries">6.6. Complementary libraries</h3> </div> </div> <div class="sect1"> -<h2 id="_faq">7. FAQ</h2> +<h2 id="_higher_order_functions">7. Higher-order functions</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_curry">7.1. curry</h3> +<div class="paragraph"> +<p>The first combinator that <em>cats</em> provides is a <code>curry</code> macro. Given a function, it can convert it to a curried +versions of itself. The generated function will accept parameters until all the expected parameters are given. +Let’s see some examples of a curried function in action:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">add</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">b</span> <span class="tok-nv">c</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span> <span class="tok-nv">c</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">curried-add</span> <span class="tok-p">(</span><span class="tok-nf">m/curry</span> <span class="tok-nv">add</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">curried-add</span> <span class="tok-p">(</span><span class="tok-nf">curried-add</span><span class="tok-p">))</span> +<span class="tok-c1">;; => true</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-p">(</span><span class="tok-nf">curried-add</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">)</span> <span class="tok-mi">6</span><span class="tok-p">)</span> +<span class="tok-c1">;; => true</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-p">((</span><span class="tok-nf">curried-add</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">)</span> <span class="tok-mi">6</span><span class="tok-p">)</span> +<span class="tok-c1">;; => true</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-p">((</span><span class="tok-nf">curried-add</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-mi">3</span><span class="tok-p">)</span> <span class="tok-mi">6</span><span class="tok-p">)</span> +<span class="tok-c1">;; => true</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>As you can see above, since the original <code>add</code> has a single arity (3) and is fixed (i.e. it doesn’t accept a variable +number of arguments), the <code>curry</code> macro was able to generate a curried function with the correct number of parameters.</p> +</div> +<div class="paragraph"> +<p>This doesn’t mean that functions with multiple arities or variadic arguments can’t be curried but an arity for the +curried function must be given:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">curried+</span> <span class="tok-p">(</span><span class="tok-nf">m/curry</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">curried+</span> <span class="tok-p">(</span><span class="tok-nf">curried+</span><span class="tok-p">))</span> +<span class="tok-c1">;; => true</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-p">(</span><span class="tok-nf">curried+</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">)</span> <span class="tok-mi">6</span><span class="tok-p">)</span> +<span class="tok-c1">;; => true</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-p">((</span><span class="tok-nf">curried+</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">)</span> <span class="tok-mi">6</span><span class="tok-p">)</span> +<span class="tok-c1">;; => true</span> + +<span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-p">((</span><span class="tok-nf">curried+</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-mi">3</span><span class="tok-p">)</span> <span class="tok-mi">6</span><span class="tok-p">)</span> +<span class="tok-c1">;; => true</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Curried functions are very useful in combination with the applicative’s <code>fapply</code> operation, since we can curry +a function and use applicatives for building up results with context-specific effects.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">curried+</span> <span class="tok-p">(</span><span class="tok-nf">m/curry</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-nv">curried+</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span> + +<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-nv">curried+</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Nothing ></span> + +<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-nv">curried+</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">nil</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span> + +<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nv">curried+</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span> + +<span class="tok-p">(</span><span class="tok-nf">m/<*></span> <span class="tok-p">(</span><span class="tok-nf">m/<$></span> <span class="tok-nv">curried+</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_lift_m">7.2. lift-m</h3> +<div class="paragraph"> +<p>The <code>lift-m</code> macro is a combinator for promoting functions that work on regular values to work on monadic values +instead. It uses the monad’s bind operation under the hood and, like <code>curry</code>, can be used without specifying arity +if the function we are lifting has a fixed and a single arity:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">add</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">b</span> <span class="tok-nv">c</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span> <span class="tok-nv">c</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">add-m</span> <span class="tok-p">(</span><span class="tok-nf">m/lift-m</span> <span class="tok-nv">add</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span> + +<span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">; => #<Nothing ></span> + +<span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">nil</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Like with <code>curry</code>, we must provide an arity in case we are lifting a function that has multiple arities or is +variadic:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">add-m</span> <span class="tok-p">(</span><span class="tok-nf">m/lift-m</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span> + +<span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">; => #<Nothing ></span> + +<span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">nil</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => nil</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Note that you can combine both <code>curry</code> and <code>lift-m</code> to get curried functions that work on monadic types using +the <code>curry-lift-m</code> macro. The arity is mandatory when using this macro:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">curried-add-m</span> <span class="tok-p">(</span><span class="tok-nf">m/curry-lift-m</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">curried-add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span> + +<span class="tok-p">((</span><span class="tok-nf">curried-add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span> + +<span class="tok-p">((</span><span class="tok-nf">curried-add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 6></span></code></pre> +</div> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_faq">8. FAQ</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions">7.1. What Clojure types implement some of the Category Theory abstractions?</h3> +<h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions">8.1. What Clojure types implement some of the Category Theory abstractions?</h3> <div class="paragraph"> <p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types that don’t act like containers. For example, Clojure keywords are values but can not be containers so @@ -1218,11 +1459,11 @@ <h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions"> <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">sequence</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus, Foldable</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">vector</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad, MonadZero, MonadPlus, Foldable</p></td> </tr> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">hash-set</p></td> @@ -1236,7 +1477,7 @@ <h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions"> </table> </div> <div class="sect2"> -<h3 id="_where_are_the_state_reader_writer_and_continuation_monads">7.2. Where are the State, Reader, Writer and Continuation monads?</h3> +<h3 id="_where_are_the_state_reader_writer_and_continuation_monads">8.2. Where are the State, Reader, Writer and Continuation monads?</h3> <div class="paragraph"> <p>TBD</p> </div> @@ -1244,10 +1485,10 @@ <h3 id="_where_are_the_state_reader_writer_and_continuation_monads">7.2. Where a </div> </div> <div class="sect1"> -<h2 id="_developers_guide">8. Developers Guide</h2> +<h2 id="_developers_guide">9. Developers Guide</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_philosophy">8.1. Philosophy</h3> +<h3 id="_philosophy">9.1. Philosophy</h3> <div class="paragraph"> <p>Five most important rules:</p> </div> @@ -1275,14 +1516,14 @@ <h3 id="_philosophy">8.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_contributing">8.2. Contributing</h3> +<h3 id="_contributing">9.2. Contributing</h3> <div class="paragraph"> <p>Unlike Clojure and other Clojure contributed libraries, <em>cats</em> does not have many restrictions for contributions. Just open an issue or pull request.</p> </div> </div> <div class="sect2"> -<h3 id="_source_code">8.3. Source Code</h3> +<h3 id="_source_code">9.3. Source Code</h3> <div class="paragraph"> <p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> </div> @@ -1296,7 +1537,7 @@ <h3 id="_source_code">8.3. Source Code</h3> </div> </div> <div class="sect2"> -<h3 id="_run_tests">8.4. Run tests</h3> +<h3 id="_run_tests">9.4. Run tests</h3> <div class="paragraph"> <p>For running tests just execute this:</p> </div> @@ -1307,7 +1548,7 @@ <h3 id="_run_tests">8.4. Run tests</h3> </div> </div> <div class="sect2"> -<h3 id="_license">8.5. License</h3> +<h3 id="_license">9.5. License</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.nz> @@ -1343,7 +1584,7 @@ <h3 id="_license">8.5. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-07-13 01:32:36 EEST +Last updated 2015-08-02 12:49:38 EEST </div> </div> </body> From 5dc31d2314dc3257fb344a6eb827566665c76721 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Sun, 2 Aug 2015 12:14:33 +0200 Subject: [PATCH 42/52] Generate documentation --- latest/api/cats.applicative.validation.html | 2 +- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 2 +- latest/api/cats.data.html | 2 +- latest/api/cats.monad.either.html | 2 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.html | 2 +- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 2 +- latest/api/cats.protocols.html | 2 +- latest/api/index.html | 2 +- latest/index.html | 6 +++--- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html index 97999ce..de6f364 100644 --- a/latest/api/cats.applicative.validation.html +++ b/latest/api/cats.applicative.validation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L196">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L102">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L115">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L97">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L109">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L189">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L121">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L196">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L102">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L115">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L97">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L109">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L189">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L121">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index 59bb1af..366f272 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L220">view source</a></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L47">view source</a></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L173">view source</a></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L111">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L220">view source</a></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L47">view source</a></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L173">view source</a></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L111">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index c4daa92..f35d9fe 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L34">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L50">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L34">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L50">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index 52a1780..29ec209 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fmap alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L427">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fapply alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L431">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L471">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L486">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L457">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L463">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L449">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fmap alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L427">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fapply alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L431">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L471">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L486">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L457">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L463">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L449">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> </code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L435">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context <code>mv</code> and any function, applies a function to value of mv.</p> diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index 8cce83a..7106325 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L72">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L76">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L72">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L76">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index baf4061..90fc0a0 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index 43b6590..276c597 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L177">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L185">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L148">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L171">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L140">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L165">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L237">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L255">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L177">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L185">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L148">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L171">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L140">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L165">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L237">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L255">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.html b/latest/api/cats.monad.html index 0269780..b23ec1e 100644 --- a/latest/api/cats.monad.html +++ b/latest/api/cats.monad.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 3a4fe75..6f8e625 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L67">view source</a></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L101">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L67">view source</a></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L101">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index 7246903..50d7a8c 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index c0aef43..5246fd8 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L63">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L34">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L54">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L72">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L59">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L77">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L50">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L63">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L34">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L54">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L72">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L59">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L77">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L50">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index da1ff07..5287472 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.6.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li></ul></div></div><div class="namespace"><h3><a href="user.html">user</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.6.1 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 4b48003..31a1181 100644 --- a/latest/index.html +++ b/latest/index.html @@ -80,7 +80,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.6.0</span> +<span id="revdate">0.6.1</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -230,7 +230,7 @@ <h3 id="_leiningen">4.1. Leiningen</h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"0.6.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"0.6.1"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> @@ -1584,7 +1584,7 @@ <h3 id="_license">9.5. License</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-08-02 12:49:38 EEST +Last updated 2015-08-02 13:10:36 EEST </div> </div> </body> From 201d7c3d9a19348625825463bc07b0093137e36a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Thu, 17 Sep 2015 12:38:02 +0100 Subject: [PATCH 43/52] Generate documentation --- latest/api/cats.applicative.validation.html | 2 +- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 86 +- latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 + latest/api/cats.labs.continuation.html | 2 + latest/api/cats.labs.manifold.html | 2 + latest/api/cats.labs.reader.html | 2 + latest/api/cats.labs.state.html | 2 + latest/api/cats.labs.writer.html | 2 + latest/api/cats.monad.continuation.html | 2 - latest/api/cats.monad.either.html | 4 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.html | 2 - latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 6 +- latest/api/cats.monad.reader.html | 2 - latest/api/cats.monad.state.html | 2 - latest/api/cats.monad.writer.html | 2 - latest/api/cats.protocols.html | 2 +- latest/api/index.html | 2 +- latest/api/js/jquery.min.js | 4 - latest/api/js/page_effects.js | 99 -- latest/api/user.html | 2 - latest/index.html | 1008 +++++++++++++++++-- 26 files changed, 994 insertions(+), 253 deletions(-) create mode 100644 latest/api/cats.labs.channel.html create mode 100644 latest/api/cats.labs.continuation.html create mode 100644 latest/api/cats.labs.manifold.html create mode 100644 latest/api/cats.labs.reader.html create mode 100644 latest/api/cats.labs.state.html create mode 100644 latest/api/cats.labs.writer.html delete mode 100644 latest/api/cats.monad.continuation.html delete mode 100644 latest/api/cats.monad.html delete mode 100644 latest/api/cats.monad.reader.html delete mode 100644 latest/api/cats.monad.state.html delete mode 100644 latest/api/cats.monad.writer.html delete mode 100644 latest/api/js/jquery.min.js delete mode 100644 latest/api/js/page_effects.js delete mode 100644 latest/api/user.html diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html index de6f364..1506b45 100644 --- a/latest/api/cats.applicative.validation.html +++ b/latest/api/cats.applicative.validation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L196">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L102">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L115">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L97">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L109">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L189">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L121">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L201">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L104">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L111">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L194">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index 366f272..8d8698a 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L220">view source</a></div></div><div class="public anchor" id="var-sequence-monad"><h3><a href="#var-sequence-monad">sequence-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L47">view source</a></div></div><div class="public anchor" id="var-set-monad"><h3><a href="#var-set-monad">set-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L173">view source</a></div></div><div class="public anchor" id="var-vector-monad"><h3><a href="#var-vector-monad">vector-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L111">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L314">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L301">view source</a></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L265">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L121">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L49">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L215">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L353">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L327">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index f35d9fe..5b094dd 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L34">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L50">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index 29ec209..71d5bae 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,12 +1,12 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fmap alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L427">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A haskell-style fapply alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L431">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L471">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L486">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments interchanged.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L457">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L463">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind, ignoring the values produced by the monad computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L449">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Performs a Haskell-style left-associative bind.</p><p>Let see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L626">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L630">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L669">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L655">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L661">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L647">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L435">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a value inside monadic context <code>mv</code> and any function, applies a function to value of mv.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L634">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L356">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> <pre><code>(bind (either/right 1) (fn [v] (return (inc v)))) ;; => #<Right [2]> -</code></pre><p>For convenience, you may prefer use a <code>mlet</code> macro that add a beautiful, let like syntax for compose operations with <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L95">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function yields another which is curried.</p><p>With inferred arity (function must have one fixed arity)</p> +</code></pre><p>For convenience, you may prefer to use the <code>mlet</code> macro, which provides a beautiful, <code>let</code>-like syntax for composing operations with the <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L81">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function, return another which is curried.</p><p>With inferred arity (function must have one fixed arity):</p> <pre><code>(defn add2 [x y] (+ x y)) (def cadd2 (curry add2)) @@ -15,7 +15,7 @@ (cadd2 1 3) ;; => 4 -</code></pre><p>With fixed arity:</p> +</code></pre><p>With given arity:</p> <pre><code>(def c+ (curry 3 +)) ((c+ 1 2) 3) @@ -23,8 +23,8 @@ ((((c+) 1) 2) 3) ;; => 6 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L253">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L236">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Is a composition of curry and lift-m macros.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L331">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function for unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L480">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given function inside af’s context and value inside av’s context, applies the function to value and return a result wrapped in context of same type of av context.</p><p>This function is variadic, so it can be used like a haskell style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L145">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Applies a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate yields false.</p><p>Otherwise, returns the instance unchanged.</p> -<pre><code>(require '[cats.monad.moaybe :as maybe]) +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L455">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L438">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L531">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L678">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L132">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> +<pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) (m/filter (partial < 2) (maybe/just 3)) @@ -32,7 +32,31 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L402">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function f to the value inside functor’s fv preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L135">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L495">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L488">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as mapseq but with the arguments in reverse order.</p><p>Let se a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L602">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L693">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> +<pre><code>(require '[cats.context :as ctx] + '[cats.core :as m] + '[cats.monad.maybe :as maybe]) + +(defn m-div [x y] + (if (zero? y) + (maybe/nothing) + (maybe/just (/ x y)))) + +(m/foldm m-div 1 [1 2 3]) +(m/foldm maybe/context m-div 1 [1 2 3]) +;; => #<Just 1/6> + +(m/foldm maybe/context m-div 1 [1 0 3]) +;; => #<Nothing> + +(foldm m-div 1 []) +;; => Exception + +(m/foldm maybe/context m-div 1 []) +(ctx/with-context maybe/context + (foldm m-div 1 [])) +;; => #<Just 1> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L700">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L686">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> </code></pre><p>Yet an other example that fails:</p> @@ -42,18 +66,7 @@ (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L382">view source</a></div></div><div class="public anchor" id="var-get-current-context"><h3><a href="#var-get-current-context">get-current-context</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-current-context)</code><code>(get-current-context default)</code></div><div class="doc"><div class="markdown"><p>Alias to cats.context/get-current for backward compatibility.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L50">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L123">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is same as that <code>(bind mv identity)</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L129">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L172">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lifts a function with the given fixed number of arguments to a monadic context.</p> -<pre><code>(def monad+ (lift-m 2 +)) - -(monad+ (maybe/just 1) (maybe/just 2)) -;; => <Just [3]> - -(monad+ (maybe/just 1) (maybe/nothing)) -;; => <Nothing> - -(monad+ [0 2 4] [1 2]) -;; => [1 2 3 4 5 6] -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L295">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L65">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function that takes a value and puts it into a monadic context, map it into the given collection calling sequence on the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L582">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L165">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L496">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -61,31 +74,44 @@ ;=> <Just [[2 3]]> (m/mapseq (fn [v] - (if (odd? v) - (maybe/just v) - (maybe/nothing))) - [1 2]) + (if (odd? v) + (maybe/just v) + (maybe/nothing))) + [1 2]) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L361">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L60">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like clojure let. This allows much easy composition of monadic computations.</p><p>Let see one example for understand how it works, this is a code using bind for compose few number of operations:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L561">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) (fn [b] (return (* b 2)))))) ;=> #<Just [4]> -</code></pre><p>Now see how this code can be more clear if you are using mlet macro for do it:</p> +</code></pre><p>Now see how this code can be made clearer by using the mlet macro:</p> <pre><code>(mlet [a (just 1) b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L183">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L117">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L111">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value v, return it wrapped in default/effect free context.</p><p>This is multiarity function that with arity pure/1 it uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> -<pre><code>(with-context either/either-monad - (pure 1) +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L176">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +<pre><code>(with-context either/context + (pure 1)) ;; => #<Right [1]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L71">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of pure and it works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L89">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> + +(pure either/context 1) +;; => #<Right [1]> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L54">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L75">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> <pre><code>(sequence [(maybe/just 2) (maybe/just 3)]) ;; => <Just [[2, 3]]> (sequence [(maybe/nothing) (maybe/just 3)]) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L340">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is false, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L165">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>If the expression is true, returns the monadic value. Otherwise, yields nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L157">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><h4 class="deprecated">deprecated</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Alias to <code>with-context</code> for backward compatibility.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L540">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> +<pre><code>(defn inc-if-even + [n] + (if (even? n) + (maybe/just (inc n)) + (maybe/nothing))) + +(ctx/with-context maybe/context + (m/traverse inc-if-even [2 4])) +;; => #<Just [3 4]> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L742">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L156">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L145">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index 7106325..28d283c 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L72">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L76">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L79">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L119">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html new file mode 100644 index 0000000..e60a0eb --- /dev/null +++ b/latest/api/cats.labs.channel.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L51">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.continuation.html b/latest/api/cats.labs.continuation.html new file mode 100644 index 0000000..b81245d --- /dev/null +++ b/latest/api/cats.labs.continuation.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L84">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L59">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L50">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L77">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html new file mode 100644 index 0000000..7727f60 --- /dev/null +++ b/latest/api/cats.labs.manifold.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.reader.html b/latest/api/cats.labs.reader.html new file mode 100644 index 0000000..e5af167 --- /dev/null +++ b/latest/api/cats.labs.reader.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L163">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L169">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L39">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L62">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L116">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L73">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L156">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.state.html b/latest/api/cats.labs.state.html new file mode 100644 index 0000000..32c5c8d --- /dev/null +++ b/latest/api/cats.labs.state.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L226">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L235">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L191">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L41">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L123">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L76">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.writer.html b/latest/api/cats.labs.writer.html new file mode 100644 index 0000000..f84f71c --- /dev/null +++ b/latest/api/cats.labs.writer.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L183">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L194">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L43">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L188">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L193">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L73">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L124">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.continuation.html b/latest/api/cats.monad.continuation.html deleted file mode 100644 index 94c1afc..0000000 --- a/latest/api/cats.monad.continuation.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L82">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L51">view source</a></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index 90fc0a0..54d1553 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) @@ -7,4 +7,4 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L217">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L227">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L235">view source</a></div></div><div class="public anchor" id="var-either-transformer"><h3><a href="#var-either-transformer">either-transformer</a></h3><div class="usage"><code>(either-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L184">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L129">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L254">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L258">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L262">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L107">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L117">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L246">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L112">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L123">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L250">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L226">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L236">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L244">view source</a></div></div><div class="public anchor" id="var-either-t"><h3><a href="#var-either-t">either-t</a></h3><div class="usage"><code>(either-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L196">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L132">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L262">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L266">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L270">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L110">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L120">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L254">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L115">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L126">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index 276c597..a751d66 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L177">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L185">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L148">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L171">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L140">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L165">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L237">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L255">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.html b/latest/api/cats.monad.html deleted file mode 100644 index b23ec1e..0000000 --- a/latest/api/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 6f8e625..463397c 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L67">view source</a></div></div><div class="public anchor" id="var-identity-transformer"><h3><a href="#var-identity-transformer">identity-transformer</a></h3><div class="usage"><code>(identity-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Identity transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L101">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L69">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index 50d7a8c..8ae81bb 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,10 +1,10 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]> -</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L313">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> +</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L323">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> <pre><code>(from-maybe (just 1)) ;=> 1 @@ -13,4 +13,4 @@ (from-maybe (nothing) 42) ;=> 42 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L133">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L106">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L119">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L319">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L280">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L298">view source</a></div></div><div class="public anchor" id="var-maybe-transformer"><h3><a href="#var-maybe-transformer">maybe-transformer</a></h3><div class="usage"><code>(maybe-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L228">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L98">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L114">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L125">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L290">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L136">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L109">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L122">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L329">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L290">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L308">view source</a></div></div><div class="public anchor" id="var-maybe-t"><h3><a href="#var-maybe-t">maybe-t</a></h3><div class="usage"><code>(maybe-t inner)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L241">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L101">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L117">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L128">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L300">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.reader.html b/latest/api/cats.monad.reader.html deleted file mode 100644 index b60f7e4..0000000 --- a/latest/api/cats.monad.reader.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L155">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L161">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L48">view source</a></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L102">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L147">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.state.html b/latest/api/cats.monad.state.html deleted file mode 100644 index 7350310..0000000 --- a/latest/api/cats.monad.state.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L236">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L246">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L204">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L218">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L53">view source</a></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L117">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L211">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.writer.html b/latest/api/cats.monad.writer.html deleted file mode 100644 index 566852e..0000000 --- a/latest/api/cats.monad.writer.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L165">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L171">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L159">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L177">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L50">view source</a></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L101">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L62">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index 5246fd8..d0e548f 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p><p>Functions of this namespace are not indented to be used directly. Is a private api but exposes as public for documentation purposes.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside ag’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L63">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establish a membership of types with one concrete monad.</p><p>This is a way that cats establishes the relation between a type and the monad that that should play.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-get-context"><h3><a href="#var-get-context">get-context</a></h3><div class="usage"><code>(get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the monad instance for curent value.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L34">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L54">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L72">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L59">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mbind"><h3><a href="#var-mbind">mbind</a></h3><div class="usage"><code>(mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var-mreturn"><h3><a href="#var-mreturn">mreturn</a></h3><div class="usage"><code>(mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L77">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A common abstraction for all monad transformers.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-base"><h3><a href="#var-base">base</a></h3><div class="usage"><code>(base mt)</code></div><div class="doc"><div class="markdown"><p>Return the base monad of this transformer.</p></div></div></div><div class="public anchor" id="var-inner"><h3><a href="#var-inner">inner</a></h3><div class="usage"><code>(inner mt)</code></div><div class="doc"><div class="markdown"><p>Return the monad that this transformer wraps.</p></div></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L50">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 5287472..51c5fec 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 0.6.1 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.1</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-sequence-monad">sequence-monad</a> </li><li> <a href="cats.builtin.html#var-set-monad">set-monad</a> </li><li> <a href="cats.builtin.html#var-vector-monad">vector-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A context management macros.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-get-current-context">get-current-context</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li><li> <a href="cats.core.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.html">cats.monad</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-transformer">either-transformer</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity-transformer">identity-transformer</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-transformer">maybe-transformer</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>Abstractions of Category Theory over that cats library is build.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.0.0-SNAPSHOT API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/js/jquery.min.js b/latest/api/js/jquery.min.js deleted file mode 100644 index 73f33fb..0000000 --- a/latest/api/js/jquery.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) -},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/latest/api/js/page_effects.js b/latest/api/js/page_effects.js deleted file mode 100644 index ef8120d..0000000 --- a/latest/api/js/page_effects.js +++ /dev/null @@ -1,99 +0,0 @@ -function visibleInParent(element) { - var position = $(element).position().top - return position > -50 && position < ($(element).offsetParent().height() - 50) -} - -function hasFragment(link, fragment) { - return $(link).attr("href").indexOf("#" + fragment) != -1 -} - -function findLinkByFragment(elements, fragment) { - return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() -} - -function scrollToCurrentVarLink(elements) { - var elements = $(elements); - var parent = elements.offsetParent(); - - if (elements.length == 0) return; - - var top = elements.first().position().top; - var bottom = elements.last().position().top + elements.last().height(); - - if (top >= 0 && bottom <= parent.height()) return; - - if (top < 0) { - parent.scrollTop(parent.scrollTop() + top); - } - else if (bottom > parent.height()) { - parent.scrollTop(parent.scrollTop() + bottom - parent.height()); - } -} - -function setCurrentVarLink() { - $('#vars a').parent().removeClass('current') - $('.anchor'). - filter(function(index) { return visibleInParent(this) }). - each(function(index, element) { - findLinkByFragment("#vars a", element.id). - parent(). - addClass('current') - }); - scrollToCurrentVarLink('#vars .current'); -} - -var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) - -function scrollPositionId(element) { - var directory = window.location.href.replace(/[^\/]+\.html$/, '') - return 'scroll::' + $(element).attr('id') + '::' + directory -} - -function storeScrollPosition(element) { - if (!hasStorage) return; - localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) - localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) -} - -function recallScrollPosition(element) { - if (!hasStorage) return; - $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) - $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) -} - -function persistScrollPosition(element) { - recallScrollPosition(element) - $(element).scroll(function() { storeScrollPosition(element) }) -} - -function sidebarContentWidth(element) { - var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) - return Math.max.apply(Math, widths) -} - -function resizeSidebars() { - var nsWidth = sidebarContentWidth('#namespaces') + 30 - var varWidth = 0 - - if ($('#vars').length != 0) { - varWidth = sidebarContentWidth('#vars') + 30 - } - - // snap to grid - var snap = 30; - nsWidth = Math.ceil(nsWidth / snap) * snap; - varWidth = Math.ceil(varWidth / snap) * snap; - - $('#namespaces').css('width', nsWidth) - $('#vars').css('width', varWidth) - $('#vars, .namespace-index').css('left', nsWidth + 1) - $('.namespace-docs').css('left', nsWidth + varWidth + 2) -} - -$(window).ready(resizeSidebars) -$(window).ready(setCurrentVarLink) -$(window).ready(function() { persistScrollPosition('#namespaces')}) -$(window).ready(function() { - $('#content').scroll(setCurrentVarLink) - $(window).resize(setCurrentVarLink) -}) diff --git a/latest/api/user.html b/latest/api/user.html deleted file mode 100644 index d1c93a5..0000000 --- a/latest/api/user.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>user documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1 current"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">user</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 31a1181..63e114f 100644 --- a/latest/index.html +++ b/latest/index.html @@ -80,7 +80,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">0.6.1</span> +<span id="revdate">1.0.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -100,10 +100,11 @@ <h1>Cats Documentation</h1> <li><a href="#_functor">5.3. Functor</a></li> <li><a href="#_applicative">5.4. Applicative</a></li> <li><a href="#_foldable">5.5. Foldable</a></li> -<li><a href="#_monad">5.6. Monad</a></li> -<li><a href="#_monadzero">5.7. MonadZero</a></li> -<li><a href="#_monadplus">5.8. MonadPlus</a></li> -<li><a href="#_monad_transformers">5.9. Monad Transformers</a></li> +<li><a href="#_traversable">5.6. Traversable</a></li> +<li><a href="#_monad">5.7. Monad</a></li> +<li><a href="#_monadzero">5.8. MonadZero</a></li> +<li><a href="#_monadplus">5.9. MonadPlus</a></li> +<li><a href="#_monad_transformers">5.10. Monad Transformers</a></li> </ul> </li> <li><a href="#_types">6. Types</a> @@ -113,28 +114,48 @@ <h1>Cats Documentation</h1> <li><a href="#_exception">6.3. Exception</a></li> <li><a href="#_validation">6.4. Validation</a></li> <li><a href="#_built_in_types">6.5. Built in types</a></li> -<li><a href="#_complementary_libraries">6.6. Complementary libraries</a></li> </ul> </li> -<li><a href="#_higher_order_functions">7. Higher-order functions</a> +<li><a href="#_syntax_sugar">7. Syntax sugar</a> <ul class="sectlevel2"> -<li><a href="#_curry">7.1. curry</a></li> -<li><a href="#_lift_m">7.2. lift-m</a></li> +<li><a href="#_mlet">7.1. mlet</a></li> +<li><a href="#_alet">7.2. alet</a></li> </ul> </li> -<li><a href="#_faq">8. FAQ</a> +<li><a href="#_higher_order_functions">8. Higher-order functions</a> <ul class="sectlevel2"> -<li><a href="#_what_clojure_types_implement_some_of_the_category_theory_abstractions">8.1. What Clojure types implement some of the Category Theory abstractions?</a></li> -<li><a href="#_where_are_the_state_reader_writer_and_continuation_monads">8.2. Where are the State, Reader, Writer and Continuation monads?</a></li> +<li><a href="#_curry">8.1. curry</a></li> +<li><a href="#_lift_m">8.2. lift-m</a></li> </ul> </li> -<li><a href="#_developers_guide">9. Developers Guide</a> +<li><a href="#_labs">9. Labs</a> <ul class="sectlevel2"> -<li><a href="#_philosophy">9.1. Philosophy</a></li> -<li><a href="#_contributing">9.2. Contributing</a></li> -<li><a href="#_source_code">9.3. Source Code</a></li> -<li><a href="#_run_tests">9.4. Run tests</a></li> -<li><a href="#_license">9.5. License</a></li> +<li><a href="#_channel">9.1. Channel</a></li> +<li><a href="#_manifold_deferred">9.2. Manifold Deferred</a></li> +<li><a href="#_state">9.3. State</a></li> +<li><a href="#_reader">9.4. Reader</a></li> +<li><a href="#_writer">9.5. Writer</a></li> +<li><a href="#_continuation">9.6. Continuation</a></li> +</ul> +</li> +<li><a href="#_complementary_libraries">10. Complementary libraries</a></li> +<li><a href="#_faq">11. FAQ</a> +<ul class="sectlevel2"> +<li><a href="#_what_clojure_types_implement_some_of_the_category_theory_abstractions">11.1. What Clojure types implement some of the Category Theory abstractions?</a></li> +</ul> +</li> +<li><a href="#_developers_guide">12. Developers Guide</a> +<ul class="sectlevel2"> +<li><a href="#_philosophy">12.1. Philosophy</a></li> +<li><a href="#_contributing">12.2. Contributing</a></li> +<li><a href="#_source_code">12.3. Source Code</a></li> +<li><a href="#_run_tests">12.4. Run tests</a></li> +<li><a href="#_license">12.5. License</a></li> +</ul> +</li> +<li><a href="#_editor_integration">13. Editor integration</a> +<ul class="sectlevel2"> +<li><a href="#_emacs">13.1. Emacs</a></li> </ul> </li> </ul> @@ -493,7 +514,7 @@ <h3 id="_applicative">5.4. Applicative</h3> </div> </div> <div class="paragraph"> -<p>If you do not understand the purpose of the <strong>pure</strong> function, the next section +<p>If you do not understand the purpose of the <strong>pure</strong> function, the next sections should clarify its purpose.</p> </div> </div> @@ -559,21 +580,163 @@ <h3 id="_foldable">5.5. Foldable</h3> <p>In languages with strict argument evaluation, <code>foldr</code> does not have many applications because when the data structure to fold grows it tends to consume all the stack (causing the well known stack overflow). In case of Clojure, the unique obvious -case of using foldr is for small datastructures or lazy sequences.</p> +case of using foldr is for small datastructures.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/foldr</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">cons </span><span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">%1</span><span class="tok-p">)</span> <span class="tok-nv">%2</span><span class="tok-p">)</span> <span class="tok-o">'</span><span class="tok-p">()</span> <span class="tok-p">(</span><span class="tok-nb">range </span><span class="tok-mi">100000</span><span class="tok-p">))</span> +<span class="tok-c1">;; => StackOverflowError</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <strong>Foldable</strong> abstraction is already implemented for cloure vectors, lazy seqs and ranges +plus the cats maybe, either and validation types. Let see an example how it behaves with maybe:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/foldr</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">cons </span><span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">%1</span><span class="tok-p">)</span> <span class="tok-nv">%2</span><span class="tok-p">)</span> <span class="tok-o">'</span><span class="tok-p">()</span> <span class="tok-p">(</span><span class="tok-nb">into </span><span class="tok-p">[]</span> <span class="tok-p">(</span><span class="tok-nb">range </span><span class="tok-mi">100000</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => StackOverflowError</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/foldl</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">%1</span> <span class="tok-nv">%2</span><span class="tok-p">))</span> <span class="tok-mi">1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 1></span> -<span class="tok-c1">;; The same operation but using lazyseqs works as expected</span> -<span class="tok-p">(</span><span class="tok-nf">m/foldr</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">cons </span><span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">%1</span><span class="tok-p">)</span> <span class="tok-nv">%2</span><span class="tok-p">)</span> <span class="tok-o">'</span><span class="tok-p">()</span> <span class="tok-p">(</span><span class="tok-nb">map identity </span><span class="tok-p">(</span><span class="tok-nb">range </span><span class="tok-mi">100000</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => (1 2 3 4 ...)</span></code></pre> +<span class="tok-p">(</span><span class="tok-nf">m/foldl</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">%1</span> <span class="tok-nv">%2</span><span class="tok-p">))</span> <span class="tok-mi">1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> +<span class="tok-c1">;; => 1</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>It there also other fold functions that are implemented in terms of the basic <code>foldl</code> +or <code>foldr</code> that can be <strong>foldm</strong> and <strong>foldmap</strong>. At this moment, cats comes only with +<strong>foldm</strong>.</p> +</div> +<div class="paragraph"> +<p>The <strong>foldm</strong> function in analgous to the <code>foldl</code> in terms of how it does the fold operation, +with the difference that is aware of the monad context. Or in other terms, it works with +reducing function that return monad types.</p> +</div> +<div class="paragraph"> +<p>Let see an example:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">m-div</span> + <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nb">zero? </span><span class="tok-nv">y</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">/ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">))))</span> + +<span class="tok-p">(</span><span class="tok-nf">m/foldm</span> <span class="tok-nv">m-div</span> <span class="tok-mi">1</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => #<Just 1/6></span> + + +<span class="tok-p">(</span><span class="tok-nf">m/foldm</span> <span class="tok-nv">m-div</span> <span class="tok-mi">1</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">0</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> </div> <div class="sect2"> -<h3 id="_monad">5.6. Monad</h3> +<h3 id="_traversable">5.6. Traversable</h3> +<div class="paragraph"> +<p>The <strong>Traversable</strong> is a generic abstraction for data structures that can be traversed from +left to right, running an Applicative action for each element. Traversables must also be +Functors and Foldables.</p> +</div> +<div class="paragraph"> +<p>Note that, since Traversables use the Applicative’s <code>pure</code> operation, the context of the +applicative must be set when using the <code>traverse</code> function.</p> +</div> +<div class="paragraph"> +<p>Let’s look at an example: we have a vector with numbers that we want to map to a Maybe value, +and we want to aggregate the result in a Maybe. If any of the actions fails (is Nothing) the +resulting aggregate will be Nothing, but if all succeed we preserve the vector’s structure +inside a Just value.</p> +</div> +<div class="paragraph"> +<p>First of all, we define the function that will transform a number to a Maybe. Our function will +wrap the value in a Just if it’s even and in a Nothing if it’s not:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">just-if-even</span> + <span class="tok-p">[</span><span class="tok-nv">n</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">even?</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now that we have a function that maps a value to the Maybe Applicative, we can traverse a vector +of numbers and aggregate a Maybe value. The applicatives will be evaluated from left to right using +the applicative’s <code>fapply</code>.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.context</span> <span class="tok-ss">:as</span> <span class="tok-nv">ctx</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">just-if-even</span> <span class="tok-p">[]))</span> +<span class="tok-c1">;; => #<Just []></span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">just-if-even</span> <span class="tok-p">[</span><span class="tok-mi">2</span> <span class="tok-mi">4</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Just [2 4]></span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">just-if-even</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Nothing ></span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">just-if-even</span> <span class="tok-p">[</span><span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Maybe is not that much of an interesting applicative, let’s see an example of using the Validation +applicative to validate a vector of values aggregating the results, be them success or failure.</p> +</div> +<div class="paragraph"> +<p>First we will define a validation function that, given a number, will succed if it’s even. If it’s +odd, it will fail and record the failure in the map monoid from value to the error type (<code>:not-even</code>).</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">valid-if-even</span> + <span class="tok-p">[</span><span class="tok-nv">n</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">even?</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-nv">n</span> <span class="tok-ss">:not-even</span><span class="tok-p">})))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now let’s try it with some vectors to see how failures are aggregated:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.context</span> <span class="tok-ss">:as</span> <span class="tok-nv">ctx</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[]))</span> +<span class="tok-c1">;; => #<Ok []></span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[</span><span class="tok-mi">2</span> <span class="tok-mi">4</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Ok [2 4]></span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Fail {1 :not-even}></span> + +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> + <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[</span><span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]))</span> +<span class="tok-c1">;; => #<Fail {3 :not-even, 5 :not-even}></span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_monad">5.7. Monad</h3> <div class="paragraph"> <p>Monads are the most discussed programming concept to come from category theory. Like functors and applicatives, monads deal with data in contexts.</p> @@ -648,33 +811,9 @@ <h3 id="_monad">5.6. Monad</h3> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> </div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -If you are coming from Haskell, mlet represents the <strong>do-syntax</strong>. -</td> -</tr> -</table> -</div> -<div class="paragraph"> -<p>If you want to use regular (non-monadic) let bindings inside an <code>mlet</code> block, you can do so using -<code>:let</code> and a binding vector inside the mlet bindings:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> - <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> - <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> -</div> -</div> </div> <div class="sect2"> -<h3 id="_monadzero">5.7. MonadZero</h3> +<h3 id="_monadzero">5.8. MonadZero</h3> <div class="paragraph"> <p>Some monads also have the notion of an identity element analogous to that of Monoid. When calling <code>bind</code> on a identity element for a monad, the same value is returned. This means that whenever we encounter the identity element in a monadic composition it will @@ -740,8 +879,7 @@ <h3 id="_monadzero">5.7. MonadZero</h3> </div> </div> <div class="paragraph"> -<p><code>mlet</code> has support for using guards using a <code>:when</code> clause, analogous to the one used in <code>for</code>. We could rewrite the above example -using <code>bind</code> with <code>mlet</code> and <code>:when</code>:</p> +<p>Or, using mlet:</p> </div> <div class="listingblock"> <div class="content"> @@ -754,12 +892,9 @@ <h3 id="_monadzero">5.7. MonadZero</h3> <span class="tok-c1">;; => #<Nothing ></span></code></pre> </div> </div> -<div class="paragraph"> -<p>Any monadic type that implements <code>MonadZero</code> can be combined with guards inside <code>mlet</code> bindings.</p> -</div> </div> <div class="sect2"> -<h3 id="_monadplus">5.8. MonadPlus</h3> +<h3 id="_monadplus">5.9. MonadPlus</h3> <div class="paragraph"> <p>MonadPlus is a complementary abstraction for Monads that support an associative binary operation, analogous to that of a Semigroup. If the monad implements the MonadZero and MonadPlus protocols it forms a monoid.</p> @@ -784,9 +919,9 @@ <h3 id="_monadplus">5.8. MonadPlus</h3> </div> </div> <div class="sect2"> -<h3 id="_monad_transformers">5.9. Monad Transformers</h3> +<h3 id="_monad_transformers">5.10. Monad Transformers</h3> <div class="sect3"> -<h4 id="_motivation">5.9.1. Motivation</h4> +<h4 id="_motivation">5.10.1. Motivation</h4> <div class="paragraph"> <p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> @@ -820,7 +955,7 @@ <h4 id="_motivation">5.9.1. Motivation</h4> </div> </div> <div class="sect3"> -<h4 id="_using_monad_transformers">5.9.2. Using monad transformers</h4> +<h4 id="_using_monad_transformers">5.10.2. Using monad transformers</h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad since we want the resulting type to be a stateful computation @@ -837,7 +972,7 @@ <h4 id="_using_monad_transformers">5.9.2. Using monad transformers</h4> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> + <span class="tok-p">[</span><span class="tok-nv">cats.labs.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> @@ -1252,34 +1387,235 @@ <h4 id="_map">6.5.5. Map</h4> </div> </div> </div> +</div> +</div> +<div class="sect1"> +<h2 id="_syntax_sugar">7. Syntax sugar</h2> +<div class="sectionbody"> <div class="sect2"> -<h3 id="_complementary_libraries">6.6. Complementary libraries</h3> +<h3 id="_mlet">7.1. mlet</h3> <div class="paragraph"> -<p>Some monads are defined as separated package to avoid additional -and unnecesary dependencies to cats. Also, there are some libraries -that build higher-level abstractions on top of what cats offers.</p> +<p>For convenience when using the monadic bind the <code>mlet</code> macro is implemented in cats. If you’ve followed along +with the documentation you’ve seen many examples of its usage already, let’s see what can <code>mlet</code> do.</p> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<div class="title">Note</div> +</td> +<td class="content"> +If you are coming from Haskell, mlet is analogous to the <strong>do notation</strong>. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>First of all, mlet turns this let-like bindings</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>into a chain of calls to bind:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>This makes a lot more natural to write code that uses monads.</p> +</div> +<div class="paragraph"> +<p>Since the bindings in the mlet macro run the monadic effects of the right-hand values we cannot just put +any value in there and expect to be bound to its left symbol. For cases where we want the regular behavior +of let we can inline a <code>:let</code> clause, just like with Clojure’s <code>for</code>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> + <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p><code>mlet</code> has support for using guards using a <code>:when</code> clause, analogous to the one used in <code>for</code>. We can filter out values +using <code>bind</code> with <code>mlet</code> and <code>:when</code> like the following:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-ss">:when</span> <span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Nothing ></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Any monadic type that implements <code>MonadZero</code> can be combined with guards inside <code>mlet</code> bindings. Here is an example with +vectors:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">]</span> + <span class="tok-ss">:when</span> <span class="tok-p">(</span><span class="tok-nf">odd?</span> <span class="tok-nv">a</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => [2 6]</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_alet">7.2. alet</h3> +<div class="paragraph"> +<p>One limitation of monadic bind is that all the steps are strictly sequential and +happen one at a time. This piece of code illustrates the usage of monadic bind:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">bind</span> <span class="tok-nv">return</span><span class="tok-p">]])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">41</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))))</span> +<span class="tok-c1">;; => #<Just 42></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>In the first call to <code>bind</code>, <code>(just 1)</code> and the anonymous function will be evaluated. +The call of the anonymous function performed by the first <code>bind</code> will cause the +evaluation of the <code>(just 41)</code> and the next anonymous function, which will be also +called to create the final result. Note that <code>(just 1)</code> and <code>(just 41)</code> are independent +and thus could be evaluated at the same time.</p> +</div> +<div class="paragraph"> +<p>Here is the <code>mlet</code> version for reference and clarity:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">41</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Just 42></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now let’s see the equivalent using <code>alet</code>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">alet</span><span class="tok-p">]])</span> + +<span class="tok-p">(</span><span class="tok-nf">alet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">41</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 42></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Note that no <code>return</code> is used, this is because the <code>alet</code> body runs inside the applicative +context with <code>fapply</code>. This is roughly what <code>alet</code> desugars to:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">do</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> + <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">41</span><span class="tok-p">))</span> +<span class="tok-c1">;; => #<Just 42></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Note that now <code>(just 1)</code> and <code>(just 41)</code> are evaluated at the same time. This use of +<code>fapply</code> can be called "applicative bind" and in some cases is more efficient than monadic +bind. Furthermore, the <code>alet</code> macro splits the bindings into batches that have +dependencies only in previous values and evaluates all applicative values in the batch at +the same time.</p> +</div> +<div class="paragraph"> +<p>This makes no difference at all for Maybe, but applicatives that have latency in their +calculations (for example promises that do an async computation) get a pretty good evaluation +strategy, which can minimize overall latency. In the next examples we use the +<a href="https://github.com/funcool/promissum">promissum</a> Clojure library. Similar results can +be achieved in ClojureScript with the <a href="https://github.com/funcool/promesa">promesa</a> library.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">promissum.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">p</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">sleep-promise</span> <span class="tok-p">[</span><span class="tok-nv">wait</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">p/promise</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">deliver</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">Thread/sleep</span> <span class="tok-nv">wait</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">deliver</span> <span class="tok-nv">wait</span><span class="tok-p">))))</span> + +<span class="tok-c1">;; note: deref-ing for blocking the current thread waiting for the promise being delivered</span> +<span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">42</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">41</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">))))</span> +<span class="tok-c1">;; "Elapsed time: 84.328182 msecs"</span> +<span class="tok-c1">;; => 83</span> + +<span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">42</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">41</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))</span> +<span class="tok-c1">;; "Elapsed time: 44.246427 msecs"</span> +<span class="tok-c1">;; => 83</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Another example for illustrating dependencies between batches:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">42</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">41</span><span class="tok-p">)</span> + <span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">x</span><span class="tok-p">))</span> + <span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">y</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">z</span> <span class="tok-nv">a</span><span class="tok-p">))))</span> +<span class="tok-c1">;; "Elapsed time: 194.253182 msecs"</span> +<span class="tok-c1">;; => 85</span> + +<span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">42</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">41</span><span class="tok-p">)</span> + <span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">x</span><span class="tok-p">))</span> + <span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">y</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">z</span> <span class="tok-nv">a</span><span class="tok-p">)))</span> +<span class="tok-c1">;; "Elapsed time: 86.20699 msecs"</span> +<span class="tok-c1">;; => 85</span></code></pre> </div> -<div class="ulist"> -<ul> -<li> -<p>Channel monad: <a href="https://github.com/funcool/canal" class="bare">https://github.com/funcool/canal</a></p> -</li> -<li> -<p>Promise monad: <a href="https://github.com/funcool/promesa" class="bare">https://github.com/funcool/promesa</a></p> -</li> -<li> -<p>Concurrent data fetching: <a href="https://github.com/kachayev/muse" class="bare">https://github.com/kachayev/muse</a></p> -</li> -</ul> </div> </div> </div> </div> <div class="sect1"> -<h2 id="_higher_order_functions">7. Higher-order functions</h2> +<h2 id="_higher_order_functions">8. Higher-order functions</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_curry">7.1. curry</h3> +<h3 id="_curry">8.1. curry</h3> <div class="paragraph"> <p>The first combinator that <em>cats</em> provides is a <code>curry</code> macro. Given a function, it can convert it to a curried versions of itself. The generated function will accept parameters until all the expected parameters are given. @@ -1363,7 +1699,7 @@ <h3 id="_curry">7.1. curry</h3> </div> </div> <div class="sect2"> -<h3 id="_lift_m">7.2. lift-m</h3> +<h3 id="_lift_m">8.2. lift-m</h3> <div class="paragraph"> <p>The <code>lift-m</code> macro is a combinator for promoting functions that work on regular values to work on monadic values instead. It uses the monad’s bind operation under the hood and, like <code>curry</code>, can be used without specifying arity @@ -1435,10 +1771,477 @@ <h3 id="_lift_m">7.2. lift-m</h3> </div> </div> <div class="sect1"> -<h2 id="_faq">8. FAQ</h2> +<h2 id="_labs">9. Labs</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>This section intends to explain different kind of extra features that can be found under +<strong>cats.labs</strong> namespace. The fact that they are here because they are experimental, requires external +dependencies or simply does not have much application in clojure(script).</p> +</div> +<div class="paragraph"> +<p>In any case the state of each module will be notified on the start of the each section.</p> +</div> +<div class="sect2"> +<h3 id="_channel">9.1. Channel</h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>This namespace exposes the ability to use the <strong>core.async</strong> channel as monadic type and in +consequence use it in <code>mlet</code> or <code>alet</code> macros.</p> +</div> +<div class="paragraph"> +<p>Before use it, you should add core.async to your dependencies:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.1.346.0-17112a-alpha"</span><span class="tok-p">]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, let see some code. This will allow you understand how it can be used and why this +integration between cats and core.async matters. At first step we will go to define a +function that emulates whatever asynchronous task, that for our case it’s consist in a +just sleep operation:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-ss">'cats.labs.channel</span><span class="tok-p">)</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">async-call</span> + <span class="tok-s">"A function that emulates some asynchronous call."</span> + <span class="tok-p">[</span><span class="tok-nv">n</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">a/go</span> + <span class="tok-p">(</span><span class="tok-nb">println </span><span class="tok-s">"---> sending request"</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">a/<!</span> <span class="tok-p">(</span><span class="tok-nf">a/timeout</span> <span class="tok-nv">n</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-nb">println </span><span class="tok-s">"<--- receiving request"</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-nv">n</span><span class="tok-p">))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, instead of using the <code>go</code> macro, just use a <code>let</code> like bindings with the help of the +<strong>mlet</strong> macro for bind values to asyncrhonous calls:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">200</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> +<span class="tok-c1">;; ---> sending request 200</span> +<span class="tok-c1">;; <--- receiving request 200</span> +<span class="tok-c1">;; ---> sending request 100</span> +<span class="tok-c1">;; <--- receiving request 100</span> +<span class="tok-c1">;; "Elapsed time: 202.236804 msecs"</span> +<span class="tok-c1">;; => 200</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Here we can observe few things:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>The asynchronous calls are made serially.</p> +</li> +<li> +<p>We are calling a function that return a channel and bind its value to a symbol.</p> +</li> +<li> +<p>At the end, an operation is performed with the <code>mlet</code> bindings.</p> +</li> +<li> +<p>The <code>mlet</code> macro also returns a channel.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>The main difference with the default clojure <code>let</code>, is that the bindings are already plain +values (not channels). The take! operation is already performed automatically by the +<code>mlet</code>. This kind of behavior will make you fully asynchronous code looks like +synchronous code.</p> +</div> +<div class="paragraph"> +<p>But, cats also comes with <code>alet</code> that has identical aspect to the previously used <code>mlet</code> +macro, but it has some advantages over it. Let see an example:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-p">(</span><span class="tok-nf">a/<!!</span> <span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> + +<span class="tok-c1">;; ---> sending request 100</span> +<span class="tok-c1">;; ---> sending request 100</span> +<span class="tok-c1">;; <--- receiving request 100</span> +<span class="tok-c1">;; <--- receiving request 100</span> +<span class="tok-c1">;; "Elapsed time: 101.06644 msecs"</span> +<span class="tok-c1">;; => 200</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>And here we can observe few things:</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>The asynchronous calls are made in parallel.</p> +</li> +<li> +<p>The total time of processing is half less of if we use <code>mlet</code>.</p> +</li> +<li> +<p>The <code>return</code> function is not used because <code>alet</code> evaluates the body in the context +of the applicative.</p> +</li> +</ul> +</div> +<div class="paragraph"> +<p>The alet is a powerfull macro that analyzes the dependencies between bindings and executes +the expressions in batches resultin in a very atractive feature for asynchronous calls.</p> +</div> +<div class="paragraph"> +<p>Here an other examples that shows in a clearly way how the batches are executed:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-p">(</span><span class="tok-nf">a/<!!</span> <span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">120</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">130</span><span class="tok-p">)</span> + <span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-p">(</span><span class="tok-nb">- </span><span class="tok-nv">x</span> <span class="tok-mi">100</span><span class="tok-p">))</span> + <span class="tok-nv">u</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-p">(</span><span class="tok-nb">- </span><span class="tok-nv">y</span> <span class="tok-mi">100</span><span class="tok-p">))</span> + <span class="tok-nv">t</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">u</span><span class="tok-p">))]</span> + <span class="tok-nv">z</span><span class="tok-p">))))</span> +<span class="tok-c1">;; ---> sending request 130</span> +<span class="tok-c1">;; ---> sending request 120</span> +<span class="tok-c1">;; <--- receiving request 120</span> +<span class="tok-c1">;; <--- receiving request 130</span> +<span class="tok-c1">;; ---> sending request 20</span> +<span class="tok-c1">;; ---> sending request 30</span> +<span class="tok-c1">;; <--- receiving request 20</span> +<span class="tok-c1">;; <--- receiving request 30</span> +<span class="tok-c1">;; ---> sending request 31</span> +<span class="tok-c1">;; <--- receiving request 31</span> +<span class="tok-c1">;; "Elapsed time: 194.536235 msecs"</span> +<span class="tok-c1">;; => 20</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_manifold_deferred">9.2. Manifold Deferred</h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>This namespace exposes the ability to use the <strong>manifold</strong> deferred as monadic type and in +consequence use it in <code>mlet</code> or <code>alet</code> macros.</p> +</div> +<div class="paragraph"> +<p>Before use it, you should add manifold to your dependencies:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">manifold</span> <span class="tok-s">"0.1.0"</span><span class="tok-p">]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, let see some code. This will allow you understand how it can be used and why this +integration between cats and manifold matters. At first step we will go to define a +function that emulates whatever asynchronous task, that for our case it’s consist in a +just sleep operation:</p> +</div> +<div class="paragraph"> +<p>For demostration purposes, let’s define a function that emulates the asyncrhonous +call:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.manifold</span> <span class="tok-ss">:as</span> <span class="tok-nv">mf</span><span class="tok-p">]</span> + <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">manifold.deferred</span> <span class="tok-ss">:as</span> <span class="tok-nv">d</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">async-call</span> + <span class="tok-s">"A function that emulates some asynchronous call."</span> + <span class="tok-p">[</span><span class="tok-nv">n</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">d/future</span> + <span class="tok-p">(</span><span class="tok-nb">println </span><span class="tok-s">"---> sending request"</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nf">Thread/sleep</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nb">println </span><span class="tok-s">"<--- receiving request"</span> <span class="tok-nv">n</span><span class="tok-p">)</span> + <span class="tok-nv">n</span><span class="tok-p">))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Now, the manifold deferreds can participate in the monad/applicative abstractions +using <code>mlet</code> and <code>alet</code> respectivelly.</p> +</div> +<div class="listingblock"> +<div class="title">Example using manifold deferred with <code>mlet</code>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">200</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> +<span class="tok-c1">;; ---> sending request 200</span> +<span class="tok-c1">;; <--- receiving request 200</span> +<span class="tok-c1">;; ---> sending request 100</span> +<span class="tok-c1">;; <--- receiving request 100</span> +<span class="tok-c1">;; "Elapsed time: 202.236804 msecs"</span> +<span class="tok-c1">;; => 200</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>If you are familiar with manifold’s <code>let-flow</code> macro, the cats <code>alet</code> serves for almost +identical purpose, with difference that <code>alet</code> is defined as generic abstraction +instread of a specific purpose macro.</p> +</div> +<div class="listingblock"> +<div class="title">Example using manifold deferred with <code>alet</code>.</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> + <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)</span> + <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> + +<span class="tok-c1">;; ---> sending request 100</span> +<span class="tok-c1">;; ---> sending request 100</span> +<span class="tok-c1">;; <--- receiving request 100</span> +<span class="tok-c1">;; <--- receiving request 100</span> +<span class="tok-c1">;; "Elapsed time: 101.06644 msecs"</span> +<span class="tok-c1">;; => 200</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="_state">9.3. State</h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>The State monad is one of the special cases of monads most commonly used in +Haskell. It has several purposes including: lazy computation, composition, and +maintaining state without explicitly passing it to every function manualy.</p> +</div> +<div class="paragraph"> +<p>The de-facto monadic type of the state monad is a plain function. A function +represents a computation as is (without executing it). Obviously, a function +should have some special characteristics to work in monad state composition.</p> +</div> +<div class="listingblock"> +<div class="title">Valid function for the state monad</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> + <span class="tok-s">"Takes a state as argument and returns a vector</span> +<span class="tok-s"> with the first element being the processed value and</span> +<span class="tok-s"> the second element being the new transformed state."</span> + <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> + <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> + <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>You just saw an example of the low-level primitive state monad. For basic usage +you do not need to write your own functions, just use some helpers that <em>cats</em> provides.</p> +</div> +<div class="paragraph"> +<p>Let’s look at one example before explaining the details:</p> +</div> +<div class="listingblock"> +<div class="title">Lazy composition of computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">st</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">st/get-state</span><span class="tok-p">)</span> + <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">st/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<State cats.labs.state.State@2eebabb6></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>At the moment of evaluation in the previous expression, nothing of what we have defined +is executed. But instead of returning the unadorned final value of the computation, +a strange/unknown object of type <strong>State</strong> is returned.</p> +</div> +<div class="paragraph"> +<p>The State type is simply a wrapper for Clojure functions, nothing more.</p> +</div> +<div class="paragraph"> +<p>Now, it’s time to execute the composed computation. We can use one of the following +functions exposed by <em>cats</em> for that: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> +</div> +<div class="ulist"> +<ul> +<li> +<p><code>run-state</code> executes the composed computation and returns both the value and the +final state.</p> +</li> +<li> +<p><code>eval-state</code> executes the composed computation and returns the resulting +value, discarding the state.</p> +</li> +<li> +<p><code>exec-state</code> executes the composed computation and returns only the resulting +state, ignoring the resulting value.</p> +</li> +</ul> +</div> +<div class="listingblock"> +<div class="title">Example of resuls of using the previosly listed functions</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => #<Pair [1 (2 3)]></span> + +<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => (2 3)</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>run-state</code> function returns an instance of the Pair type. The Pair type acts like any other seq in +Clojure with the exception that it can only contain two values.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_reader">9.4. Reader</h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>The reader monad is another commonly used monad in Haskell. It’s used for gluing together computations that +depend on a read-only environment. As with the state monad, we don’t have to thread the environment manualy +since the monadic bind does it for us. The type of the reader monad are one-argument functions.</p> +</div> +<div class="paragraph"> +<p>The Reader type is analogous to State, simply a wrapper for regular Clojure functions. If we want our functions +to participate in the reader abstraction we have to wrap them in a Reader instance.</p> +</div> +<div class="listingblock"> +<div class="title">Valid function for the reader monad</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">start-server</span> + <span class="tok-p">(</span><span class="tok-nf">r/reader</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">env</span><span class="tok-p">]</span> + <span class="tok-s">"Takes an environment with options as an argument and runs a web</span> +<span class="tok-s"> server in the address specified by `:host` and `:port`."</span> + <span class="tok-p">(</span><span class="tok-nf">run-http-server</span> <span class="tok-p">(</span><span class="tok-ss">:host</span> <span class="tok-nv">env</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-ss">:port</span> <span class="tok-nv">env</span><span class="tok-p">)))))</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>cats provides a few reader functions already. <code>ask</code> is the simplest reader, simply returns the environment. We +can execute readers using the <code>run-reader</code> function which accepts a reader and an environment.</p> +</div> +<div class="listingblock"> +<div class="title">Example of running the ask reader</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">r/run-reader</span> <span class="tok-nv">r/ask</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [1 2 3]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Let’s use <code>mlet</code> for building new readers out of existing ones:</p> +</div> +<div class="listingblock"> +<div class="title">Example of composing reader computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">env</span> <span class="tok-nv">r/ask</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">env</span><span class="tok-p">)))</span> +<span class="tok-c1">;; => #<Reader cats.labs.reader.Reader@2eebabb6></span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>We can then run it using <code>run-reader</code>:</p> +</div> +<div class="listingblock"> +<div class="title">Example of composing reader computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">r/run-reader</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">env</span> <span class="tok-nv">r/ask</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">env</span><span class="tok-p">)))</span> + <span class="tok-mi">41</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>We can also alter the reader’s environment in a context using the <code>local</code> function which given a function and +a reader returns a new reader whose environment is the result of applying the first function given to <code>local</code> to +the original environment. Let’s see it in action to understand it better:</p> +</div> +<div class="listingblock"> +<div class="title">Example of composing reader computations</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">r/run-reader</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">env</span> <span class="tok-p">(</span><span class="tok-nf">r/local</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-mi">2</span> <span class="tok-nv">%</span><span class="tok-p">)</span> <span class="tok-nv">r/ask</span><span class="tok-p">)]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">env</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> + <span class="tok-mi">20</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Note that since we executed <code>ask</code> with the function <code>#(*2 %)</code> altering its original environment (20), the resulting +<code>env</code> value is two times the original environment.</p> +</div> +</div> +<div class="sect2"> +<h3 id="_writer">9.5. Writer</h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +<div class="sect2"> +<h3 id="_continuation">9.6. Continuation</h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>TODO</p> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_complementary_libraries">10. Complementary libraries</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>Some monads are defined as separated package to avoid additional +and unnecesary dependencies to cats. Also, there are some libraries +that build higher-level abstractions on top of what cats offers.</p> +</div> +<div class="ulist"> +<ul> +<li> +<p>Promise monad (ClojureScript): <a href="https://github.com/funcool/promesa" class="bare">https://github.com/funcool/promesa</a></p> +</li> +<li> +<p>Promise monad (Clojure): <a href="https://github.com/funcool/promissum" class="bare">https://github.com/funcool/promissum</a></p> +</li> +<li> +<p>Concurrent data fetching: <a href="https://github.com/kachayev/muse" class="bare">https://github.com/kachayev/muse</a></p> +</li> +</ul> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_faq">11. FAQ</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions">8.1. What Clojure types implement some of the Category Theory abstractions?</h3> +<h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions">11.1. What Clojure types implement some of the Category Theory abstractions?</h3> <div class="paragraph"> <p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types that don’t act like containers. For example, Clojure keywords are values but can not be containers so @@ -1476,19 +2279,13 @@ <h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions"> </tbody> </table> </div> -<div class="sect2"> -<h3 id="_where_are_the_state_reader_writer_and_continuation_monads">8.2. Where are the State, Reader, Writer and Continuation monads?</h3> -<div class="paragraph"> -<p>TBD</p> -</div> -</div> </div> </div> <div class="sect1"> -<h2 id="_developers_guide">9. Developers Guide</h2> +<h2 id="_developers_guide">12. Developers Guide</h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_philosophy">9.1. Philosophy</h3> +<h3 id="_philosophy">12.1. Philosophy</h3> <div class="paragraph"> <p>Five most important rules:</p> </div> @@ -1516,14 +2313,14 @@ <h3 id="_philosophy">9.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_contributing">9.2. Contributing</h3> +<h3 id="_contributing">12.2. Contributing</h3> <div class="paragraph"> <p>Unlike Clojure and other Clojure contributed libraries, <em>cats</em> does not have many restrictions for contributions. Just open an issue or pull request.</p> </div> </div> <div class="sect2"> -<h3 id="_source_code">9.3. Source Code</h3> +<h3 id="_source_code">12.3. Source Code</h3> <div class="paragraph"> <p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> </div> @@ -1537,7 +2334,7 @@ <h3 id="_source_code">9.3. Source Code</h3> </div> </div> <div class="sect2"> -<h3 id="_run_tests">9.4. Run tests</h3> +<h3 id="_run_tests">12.4. Run tests</h3> <div class="paragraph"> <p>For running tests just execute this:</p> </div> @@ -1548,7 +2345,7 @@ <h3 id="_run_tests">9.4. Run tests</h3> </div> </div> <div class="sect2"> -<h3 id="_license">9.5. License</h3> +<h3 id="_license">12.5. License</h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.nz> @@ -1581,10 +2378,31 @@ <h3 id="_license">9.5. License</h3> </div> </div> </div> +<div class="sect1"> +<h2 id="_editor_integration">13. Editor integration</h2> +<div class="sectionbody"> +<div class="sect2"> +<h3 id="_emacs">13.1. Emacs</h3> +<div class="paragraph"> +<p>For making Emacs' clojure-mode treat <code>alet</code>, <code>mlet</code> et al like a <code>let</code> and indent +them correctly, you can use <code>define-clojure-indent</code> like in the following example:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="elisp"><span class="tok-p">(</span><span class="tok-nb">require</span> <span class="tok-ss">'clojure-mode</span><span class="tok-p">)</span> + +<span class="tok-p">(</span><span class="tok-nv">define-clojure-indent</span> + <span class="tok-p">(</span><span class="tok-nv">alet</span> <span class="tok-ss">'defun</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nv">mlet</span> <span class="tok-ss">'defun</span><span class="tok-p">))</span></code></pre> +</div> +</div> +</div> +</div> +</div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-08-02 13:10:36 EEST +Last updated 2015-09-17 13:09:36 CEST </div> </div> </body> From 4567a7cb8cf275baafd027ec697224077a99f2f1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Thu, 17 Sep 2015 16:32:10 +0200 Subject: [PATCH 44/52] Generate documentation --- latest/api/cats.applicative.validation.html | 2 +- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 2 +- latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 +- latest/api/cats.labs.continuation.html | 2 +- latest/api/cats.labs.manifold.html | 2 +- latest/api/cats.labs.reader.html | 2 +- latest/api/cats.labs.state.html | 2 +- latest/api/cats.labs.writer.html | 2 +- latest/api/cats.monad.continuation.html | 2 + latest/api/cats.monad.either.html | 2 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.html | 2 + latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 2 +- latest/api/cats.monad.reader.html | 2 + latest/api/cats.monad.state.html | 2 + latest/api/cats.monad.writer.html | 2 + latest/api/cats.protocols.html | 2 +- latest/api/index.html | 2 +- latest/api/js/jquery.min.js | 4 + latest/api/js/page_effects.js | 99 ++++++++++ latest/api/user.html | 2 + latest/index.html | 202 ++++++++++---------- 26 files changed, 233 insertions(+), 118 deletions(-) create mode 100644 latest/api/cats.monad.continuation.html create mode 100644 latest/api/cats.monad.html create mode 100644 latest/api/cats.monad.reader.html create mode 100644 latest/api/cats.monad.state.html create mode 100644 latest/api/cats.monad.writer.html create mode 100644 latest/api/js/jquery.min.js create mode 100644 latest/api/js/page_effects.js create mode 100644 latest/api/user.html diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html index 1506b45..afc0991 100644 --- a/latest/api/cats.applicative.validation.html +++ b/latest/api/cats.applicative.validation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L201">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L104">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L111">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L194">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L201">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L104">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L111">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L194">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index 8d8698a..fb30078 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L314">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L301">view source</a></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L265">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L121">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L49">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L215">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L353">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L327">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L314">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L301">view source</a></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L265">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L121">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L49">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L215">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L353">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L327">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index 5b094dd..9643fff 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index 71d5bae..ee91471 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L626">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L630">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L669">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L655">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L661">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L647">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L626">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L630">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L669">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L655">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L661">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L647">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> </code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L634">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L356">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index 28d283c..e92350e 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L79">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L119">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L79">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L119">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html index e60a0eb..fad9ace 100644 --- a/latest/api/cats.labs.channel.html +++ b/latest/api/cats.labs.channel.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L51">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L51">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.continuation.html b/latest/api/cats.labs.continuation.html index b81245d..de48d85 100644 --- a/latest/api/cats.labs.continuation.html +++ b/latest/api/cats.labs.continuation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L84">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L59">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L50">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L77">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L84">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L59">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L50">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L77">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html index 7727f60..9c37951 100644 --- a/latest/api/cats.labs.manifold.html +++ b/latest/api/cats.labs.manifold.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.reader.html b/latest/api/cats.labs.reader.html index e5af167..a1f5f42 100644 --- a/latest/api/cats.labs.reader.html +++ b/latest/api/cats.labs.reader.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L163">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L169">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L39">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L62">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L116">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L73">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L156">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L163">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L169">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L39">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L62">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L116">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L73">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L156">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.state.html b/latest/api/cats.labs.state.html index 32c5c8d..d83b986 100644 --- a/latest/api/cats.labs.state.html +++ b/latest/api/cats.labs.state.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L226">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L235">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L191">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L41">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L123">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L76">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L226">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L235">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L191">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L41">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L123">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L76">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.writer.html b/latest/api/cats.labs.writer.html index f84f71c..3beb1a1 100644 --- a/latest/api/cats.labs.writer.html +++ b/latest/api/cats.labs.writer.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L183">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L194">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L43">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L188">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L193">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L73">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L124">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L183">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L194">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L43">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L188">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L193">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L73">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L124">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.continuation.html b/latest/api/cats.monad.continuation.html new file mode 100644 index 0000000..94c1afc --- /dev/null +++ b/latest/api/cats.monad.continuation.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L82">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L51">view source</a></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index 54d1553..2b91123 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index a751d66..bf41d2e 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.html b/latest/api/cats.monad.html new file mode 100644 index 0000000..03fe199 --- /dev/null +++ b/latest/api/cats.monad.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.7.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 463397c..34549d7 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L69">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L69">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index 8ae81bb..b1e6685 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) diff --git a/latest/api/cats.monad.reader.html b/latest/api/cats.monad.reader.html new file mode 100644 index 0000000..b60f7e4 --- /dev/null +++ b/latest/api/cats.monad.reader.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L155">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L161">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L48">view source</a></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L102">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L147">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.state.html b/latest/api/cats.monad.state.html new file mode 100644 index 0000000..7350310 --- /dev/null +++ b/latest/api/cats.monad.state.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L236">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L246">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L204">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L218">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L53">view source</a></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L117">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L211">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.writer.html b/latest/api/cats.monad.writer.html new file mode 100644 index 0000000..566852e --- /dev/null +++ b/latest/api/cats.monad.writer.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L165">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L171">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L159">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L177">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L50">view source</a></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L101">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L62">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index d0e548f..b1bf053 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 51c5fec..12a6cde 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.0.0-SNAPSHOT API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.0.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/js/jquery.min.js b/latest/api/js/jquery.min.js new file mode 100644 index 0000000..73f33fb --- /dev/null +++ b/latest/api/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/latest/api/js/page_effects.js b/latest/api/js/page_effects.js new file mode 100644 index 0000000..ef8120d --- /dev/null +++ b/latest/api/js/page_effects.js @@ -0,0 +1,99 @@ +function visibleInParent(element) { + var position = $(element).position().top + return position > -50 && position < ($(element).offsetParent().height() - 50) +} + +function hasFragment(link, fragment) { + return $(link).attr("href").indexOf("#" + fragment) != -1 +} + +function findLinkByFragment(elements, fragment) { + return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() +} + +function scrollToCurrentVarLink(elements) { + var elements = $(elements); + var parent = elements.offsetParent(); + + if (elements.length == 0) return; + + var top = elements.first().position().top; + var bottom = elements.last().position().top + elements.last().height(); + + if (top >= 0 && bottom <= parent.height()) return; + + if (top < 0) { + parent.scrollTop(parent.scrollTop() + top); + } + else if (bottom > parent.height()) { + parent.scrollTop(parent.scrollTop() + bottom - parent.height()); + } +} + +function setCurrentVarLink() { + $('#vars a').parent().removeClass('current') + $('.anchor'). + filter(function(index) { return visibleInParent(this) }). + each(function(index, element) { + findLinkByFragment("#vars a", element.id). + parent(). + addClass('current') + }); + scrollToCurrentVarLink('#vars .current'); +} + +var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) + +function scrollPositionId(element) { + var directory = window.location.href.replace(/[^\/]+\.html$/, '') + return 'scroll::' + $(element).attr('id') + '::' + directory +} + +function storeScrollPosition(element) { + if (!hasStorage) return; + localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) + localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) +} + +function recallScrollPosition(element) { + if (!hasStorage) return; + $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) + $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) +} + +function persistScrollPosition(element) { + recallScrollPosition(element) + $(element).scroll(function() { storeScrollPosition(element) }) +} + +function sidebarContentWidth(element) { + var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) + return Math.max.apply(Math, widths) +} + +function resizeSidebars() { + var nsWidth = sidebarContentWidth('#namespaces') + 30 + var varWidth = 0 + + if ($('#vars').length != 0) { + varWidth = sidebarContentWidth('#vars') + 30 + } + + // snap to grid + var snap = 30; + nsWidth = Math.ceil(nsWidth / snap) * snap; + varWidth = Math.ceil(varWidth / snap) * snap; + + $('#namespaces').css('width', nsWidth) + $('#vars').css('width', varWidth) + $('#vars, .namespace-index').css('left', nsWidth + 1) + $('.namespace-docs').css('left', nsWidth + varWidth + 2) +} + +$(window).ready(resizeSidebars) +$(window).ready(setCurrentVarLink) +$(window).ready(function() { persistScrollPosition('#namespaces')}) +$(window).ready(function() { + $('#content').scroll(setCurrentVarLink) + $(window).resize(setCurrentVarLink) +}) diff --git a/latest/api/user.html b/latest/api/user.html new file mode 100644 index 0000000..d1c93a5 --- /dev/null +++ b/latest/api/user.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>user documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1 current"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">user</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 63e114f..f7cd834 100644 --- a/latest/index.html +++ b/latest/index.html @@ -85,77 +85,77 @@ <h1>Cats Documentation</h1> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> <ul class="sectlevel1"> -<li><a href="#_introduction">1. Introduction</a></li> -<li><a href="#_rationale">2. Rationale</a></li> -<li><a href="#_project_maturity">3. Project Maturity</a></li> -<li><a href="#_install">4. Install</a> +<li><a href="#introduction">Introduction</a></li> +<li><a href="#rationale">Rationale</a></li> +<li><a href="#project-maturity">Project Maturity</a></li> +<li><a href="#install">Install</a> <ul class="sectlevel2"> -<li><a href="#_leiningen">4.1. Leiningen</a></li> +<li><a href="#leiningen">Leiningen</a></li> </ul> </li> -<li><a href="#_user_guide">5. User Guide</a> +<li><a href="#user-guide">User Guide</a> <ul class="sectlevel2"> -<li><a href="#_semigroup">5.1. Semigroup</a></li> -<li><a href="#_monoid">5.2. Monoid</a></li> -<li><a href="#_functor">5.3. Functor</a></li> -<li><a href="#_applicative">5.4. Applicative</a></li> -<li><a href="#_foldable">5.5. Foldable</a></li> -<li><a href="#_traversable">5.6. Traversable</a></li> -<li><a href="#_monad">5.7. Monad</a></li> -<li><a href="#_monadzero">5.8. MonadZero</a></li> -<li><a href="#_monadplus">5.9. MonadPlus</a></li> -<li><a href="#_monad_transformers">5.10. Monad Transformers</a></li> +<li><a href="#semigroup">Semigroup</a></li> +<li><a href="#monoid">Monoid</a></li> +<li><a href="#functor">Functor</a></li> +<li><a href="#applicative">Applicative</a></li> +<li><a href="#foldable">Foldable</a></li> +<li><a href="#traversable">Traversable</a></li> +<li><a href="#monad">Monad</a></li> +<li><a href="#monadzero">MonadZero</a></li> +<li><a href="#monadplus">MonadPlus</a></li> +<li><a href="#monad-transformers">Monad Transformers</a></li> </ul> </li> -<li><a href="#_types">6. Types</a> +<li><a href="#types">Types</a> <ul class="sectlevel2"> -<li><a href="#_maybe">6.1. Maybe</a></li> -<li><a href="#_either">6.2. Either</a></li> -<li><a href="#_exception">6.3. Exception</a></li> -<li><a href="#_validation">6.4. Validation</a></li> -<li><a href="#_built_in_types">6.5. Built in types</a></li> +<li><a href="#maybe">Maybe</a></li> +<li><a href="#either">Either</a></li> +<li><a href="#exception">Exception</a></li> +<li><a href="#validation">Validation</a></li> +<li><a href="#built-in-types">Built in types</a></li> </ul> </li> -<li><a href="#_syntax_sugar">7. Syntax sugar</a> +<li><a href="#syntax-sugar">Syntax sugar</a> <ul class="sectlevel2"> -<li><a href="#_mlet">7.1. mlet</a></li> -<li><a href="#_alet">7.2. alet</a></li> +<li><a href="#mlet">mlet</a></li> +<li><a href="#alet">alet</a></li> </ul> </li> -<li><a href="#_higher_order_functions">8. Higher-order functions</a> +<li><a href="#higher-order-functions">Higher-order functions</a> <ul class="sectlevel2"> -<li><a href="#_curry">8.1. curry</a></li> -<li><a href="#_lift_m">8.2. lift-m</a></li> +<li><a href="#curry">curry</a></li> +<li><a href="#lift-m">lift-m</a></li> </ul> </li> -<li><a href="#_labs">9. Labs</a> +<li><a href="#labs">Labs</a> <ul class="sectlevel2"> -<li><a href="#_channel">9.1. Channel</a></li> -<li><a href="#_manifold_deferred">9.2. Manifold Deferred</a></li> -<li><a href="#_state">9.3. State</a></li> -<li><a href="#_reader">9.4. Reader</a></li> -<li><a href="#_writer">9.5. Writer</a></li> -<li><a href="#_continuation">9.6. Continuation</a></li> +<li><a href="#channel">Channel</a></li> +<li><a href="#manifold-deferred">Manifold Deferred</a></li> +<li><a href="#state">State</a></li> +<li><a href="#reader">Reader</a></li> +<li><a href="#writer">Writer</a></li> +<li><a href="#continuation">Continuation</a></li> </ul> </li> -<li><a href="#_complementary_libraries">10. Complementary libraries</a></li> -<li><a href="#_faq">11. FAQ</a> +<li><a href="#complementary-libraries">Complementary libraries</a></li> +<li><a href="#faq">FAQ</a> <ul class="sectlevel2"> -<li><a href="#_what_clojure_types_implement_some_of_the_category_theory_abstractions">11.1. What Clojure types implement some of the Category Theory abstractions?</a></li> +<li><a href="#what-clojure-types-implement-some-of-the-category-theory-abstractions">What Clojure types implement some of the Category Theory abstractions?</a></li> </ul> </li> -<li><a href="#_developers_guide">12. Developers Guide</a> +<li><a href="#developers-guide">Developers Guide</a> <ul class="sectlevel2"> -<li><a href="#_philosophy">12.1. Philosophy</a></li> -<li><a href="#_contributing">12.2. Contributing</a></li> -<li><a href="#_source_code">12.3. Source Code</a></li> -<li><a href="#_run_tests">12.4. Run tests</a></li> -<li><a href="#_license">12.5. License</a></li> +<li><a href="#philosophy">Philosophy</a></li> +<li><a href="#contributing">Contributing</a></li> +<li><a href="#source-code">Source Code</a></li> +<li><a href="#run-tests">Run tests</a></li> +<li><a href="#license">License</a></li> </ul> </li> -<li><a href="#_editor_integration">13. Editor integration</a> +<li><a href="#editor-integration">Editor integration</a> <ul class="sectlevel2"> -<li><a href="#_emacs">13.1. Emacs</a></li> +<li><a href="#emacs">Emacs</a></li> </ul> </li> </ul> @@ -170,7 +170,7 @@ <h1>Cats Documentation</h1> </div> </div> <div class="sect1"> -<h2 id="_introduction">1. Introduction</h2> +<h2 id="introduction"><a class="link" href="#introduction">Introduction</a></h2> <div class="sectionbody"> <div class="paragraph"> <p>Category Theory and algebraic abstractions for Clojure.</p> @@ -178,7 +178,7 @@ <h2 id="_introduction">1. Introduction</h2> </div> </div> <div class="sect1"> -<h2 id="_rationale">2. Rationale</h2> +<h2 id="rationale"><a class="link" href="#rationale">Rationale</a></h2> <div class="sectionbody"> <div class="paragraph"> <p>The main motivations for writing this library are:</p> @@ -230,7 +230,7 @@ <h2 id="_rationale">2. Rationale</h2> </div> </div> <div class="sect1"> -<h2 id="_project_maturity">3. Project Maturity</h2> +<h2 id="project-maturity"><a class="link" href="#project-maturity">Project Maturity</a></h2> <div class="sectionbody"> <div class="paragraph"> <p>Since <em>cats</em> is a young project, there can be some <a href="api/index.html#id">API</a> breakage.</p> @@ -238,27 +238,27 @@ <h2 id="_project_maturity">3. Project Maturity</h2> </div> </div> <div class="sect1"> -<h2 id="_install">4. Install</h2> +<h2 id="install"><a class="link" href="#install">Install</a></h2> <div class="sectionbody"> <div class="paragraph"> <p>This section covers installing <em>cats</em>.</p> </div> <div class="sect2"> -<h3 id="_leiningen">4.1. Leiningen</h3> +<h3 id="leiningen"><a class="link" href="#leiningen">Leiningen</a></h3> <div class="paragraph"> <p>The simplest way to use <em>cats</em> in a Clojure project is by including it as a dependency in your <strong><em>project.clj</em></strong>:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"0.6.1"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.0.0"</span><span class="tok-p">]</span></code></pre> </div> </div> </div> </div> </div> <div class="sect1"> -<h2 id="_user_guide">5. User Guide</h2> +<h2 id="user-guide"><a class="link" href="#user-guide">User Guide</a></h2> <div class="sectionbody"> <div class="paragraph"> <p>This section introduces almost all the category theory and algebraic abstractions that the <em>cats</em> library @@ -270,7 +270,7 @@ <h2 id="_user_guide">5. User Guide</h2> section of this documentation.</p> </div> <div class="sect2"> -<h3 id="_semigroup">5.1. Semigroup</h3> +<h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> <div class="paragraph"> <p>A semigroup is an algebraic structure with an associative binary operation (<code>mappend</code>). Most of the builtin collections form a semigroup because their associative binary operation is analogous to Clojure’s <code>into</code>.</p> @@ -298,7 +298,7 @@ <h3 id="_semigroup">5.1. Semigroup</h3> </div> </div> <div class="sect2"> -<h3 id="_monoid">5.2. Monoid</h3> +<h3 id="monoid"><a class="link" href="#monoid">Monoid</a></h3> <div class="paragraph"> <p>A Monoid is a Semigroup with an identity element (<code>mempty</code>). For the collection types the <code>mempty</code> function is analogous to Clojure’s <code>empty</code>.</p> @@ -321,7 +321,7 @@ <h3 id="_monoid">5.2. Monoid</h3> </div> </div> <div class="sect2"> -<h3 id="_functor">5.3. Functor</h3> +<h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <div class="paragraph"> <p>Let’s dive into the functor. The Functor represents some sort of "computational context", and the abstraction consists of one unique function: <strong>fmap</strong>.</p> @@ -414,7 +414,7 @@ <h3 id="_functor">5.3. Functor</h3> </div> </div> <div class="sect2"> -<h3 id="_applicative">5.4. Applicative</h3> +<h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> <div class="paragraph"> <p>Let’s continue with applicative functors. The Applicative Functor represents some sort of "computational context" like a plain Functor, but with the ability to @@ -519,7 +519,7 @@ <h3 id="_applicative">5.4. Applicative</h3> </div> </div> <div class="sect2"> -<h3 id="_foldable">5.5. Foldable</h3> +<h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> <div class="paragraph"> <p>The <strong>Foldable</strong> is a generic abstraction for data structures that can be folded. It consists mainly on two functions: <code>foldl</code> and <code>foldr</code>. <code>foldl</code> is also known as <code>reduce</code> or <code>inject</code> @@ -632,7 +632,7 @@ <h3 id="_foldable">5.5. Foldable</h3> </div> </div> <div class="sect2"> -<h3 id="_traversable">5.6. Traversable</h3> +<h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> <div class="paragraph"> <p>The <strong>Traversable</strong> is a generic abstraction for data structures that can be traversed from left to right, running an Applicative action for each element. Traversables must also be @@ -736,7 +736,7 @@ <h3 id="_traversable">5.6. Traversable</h3> </div> </div> <div class="sect2"> -<h3 id="_monad">5.7. Monad</h3> +<h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="paragraph"> <p>Monads are the most discussed programming concept to come from category theory. Like functors and applicatives, monads deal with data in contexts.</p> @@ -813,7 +813,7 @@ <h3 id="_monad">5.7. Monad</h3> </div> </div> <div class="sect2"> -<h3 id="_monadzero">5.8. MonadZero</h3> +<h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> <div class="paragraph"> <p>Some monads also have the notion of an identity element analogous to that of Monoid. When calling <code>bind</code> on a identity element for a monad, the same value is returned. This means that whenever we encounter the identity element in a monadic composition it will @@ -894,7 +894,7 @@ <h3 id="_monadzero">5.8. MonadZero</h3> </div> </div> <div class="sect2"> -<h3 id="_monadplus">5.9. MonadPlus</h3> +<h3 id="monadplus"><a class="link" href="#monadplus">MonadPlus</a></h3> <div class="paragraph"> <p>MonadPlus is a complementary abstraction for Monads that support an associative binary operation, analogous to that of a Semigroup. If the monad implements the MonadZero and MonadPlus protocols it forms a monoid.</p> @@ -919,9 +919,9 @@ <h3 id="_monadplus">5.9. MonadPlus</h3> </div> </div> <div class="sect2"> -<h3 id="_monad_transformers">5.10. Monad Transformers</h3> +<h3 id="monad-transformers"><a class="link" href="#monad-transformers">Monad Transformers</a></h3> <div class="sect3"> -<h4 id="_motivation">5.10.1. Motivation</h4> +<h4 id="motivation"><a class="link" href="#motivation">Motivation</a></h4> <div class="paragraph"> <p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> @@ -955,7 +955,7 @@ <h4 id="_motivation">5.10.1. Motivation</h4> </div> </div> <div class="sect3"> -<h4 id="_using_monad_transformers">5.10.2. Using monad transformers</h4> +<h4 id="using-monad-transformers"><a class="link" href="#using-monad-transformers">Using monad transformers</a></h4> <div class="paragraph"> <p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer using State as the base monad since we want the resulting type to be a stateful computation @@ -1000,10 +1000,10 @@ <h4 id="_using_monad_transformers">5.10.2. Using monad transformers</h4> </div> </div> <div class="sect1"> -<h2 id="_types">6. Types</h2> +<h2 id="types"><a class="link" href="#types">Types</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_maybe">6.1. Maybe</h3> +<h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <div class="paragraph"> <p>This is one of the two most used monad types (also known as Optional in other programming languages).</p> @@ -1084,7 +1084,7 @@ <h3 id="_maybe">6.1. Maybe</h3> </div> </div> <div class="sect2"> -<h3 id="_either">6.2. Either</h3> +<h3 id="either"><a class="link" href="#either">Either</a></h3> <div class="paragraph"> <p>Either is another type that represents a result of a computation, but (in contrast with maybe) it can return some data with a failed computation result.</p> @@ -1131,7 +1131,7 @@ <h3 id="_either">6.2. Either</h3> </div> </div> <div class="sect2"> -<h3 id="_exception">6.3. Exception</h3> +<h3 id="exception"><a class="link" href="#exception">Exception</a></h3> <div class="paragraph"> <p>Also known as the Try monad, as popularized by Scala.</p> </div> @@ -1209,7 +1209,7 @@ <h3 id="_exception">6.3. Exception</h3> </div> </div> <div class="sect2"> -<h3 id="_validation">6.4. Validation</h3> +<h3 id="validation"><a class="link" href="#validation">Validation</a></h3> <div class="paragraph"> <p>The validation type is similar to the Either or Exception types except that it doesn’t implement a Monad instance. It has two constructors: <code>ok</code> and <code>fail</code>, @@ -1250,7 +1250,7 @@ <h3 id="_validation">6.4. Validation</h3> </div> </div> <div class="sect2"> -<h3 id="_built_in_types">6.5. Built in types</h3> +<h3 id="built-in-types"><a class="link" href="#built-in-types">Built in types</a></h3> <div class="paragraph"> <p>Some of the abstractions in <em>cats</em> are implemented for built-in types but you can’t use them directly. First, you must load the <code>cats.builtin</code> namespace:</p> @@ -1265,7 +1265,7 @@ <h3 id="_built_in_types">6.5. Built in types</h3> </div> </div> <div class="sect3"> -<h4 id="_nil">6.5.1. nil</h4> +<h4 id="nil"><a class="link" href="#nil">nil</a></h4> <div class="paragraph"> <p>Given the fact that <code>nil</code> is both a value and a type, we have extended the <code>nil</code> type to be equivalent to Maybe monad’s <code>Nothing</code>. This means that you can use <code>nil</code> as if were a <code>Just</code> instance like in the @@ -1288,7 +1288,7 @@ <h4 id="_nil">6.5.1. nil</h4> </div> </div> <div class="sect3"> -<h4 id="_vector">6.5.2. Vector</h4> +<h4 id="vector"><a class="link" href="#vector">Vector</a></h4> <div class="paragraph"> <p>Clojure vectors also participate in several of the abstractions implemented in <em>cats</em>, most notably as a monad. Compare the following <code>for</code> comprehension:</p> @@ -1324,7 +1324,7 @@ <h4 id="_vector">6.5.2. Vector</h4> </div> </div> <div class="sect3"> -<h4 id="_lazy_sequences">6.5.3. Lazy sequences</h4> +<h4 id="lazy-sequences"><a class="link" href="#lazy-sequences">Lazy sequences</a></h4> <div class="paragraph"> <p>Lazy sequences implement the same abstractions as vectors with practically an identical implementation. If you don’t need the results right away or are interested in a subset of the final results, you can use lazy sequence comprehensions.</p> @@ -1345,7 +1345,7 @@ <h4 id="_lazy_sequences">6.5.3. Lazy sequences</h4> </div> </div> <div class="sect3"> -<h4 id="_set">6.5.4. Set</h4> +<h4 id="set"><a class="link" href="#set">Set</a></h4> <div class="paragraph"> <p>Sets implement almost every abstraction in <em>cats</em>, from Semigroup to Monad.</p> </div> @@ -1367,7 +1367,7 @@ <h4 id="_set">6.5.4. Set</h4> </div> </div> <div class="sect3"> -<h4 id="_map">6.5.5. Map</h4> +<h4 id="map"><a class="link" href="#map">Map</a></h4> <div class="paragraph"> <p>Maps implement the <em>Semigroup</em> protocol, since we can use <code>merge</code> as their associative binary operation. Using <code>mappend</code> on maps is a way to merge them together:</p> @@ -1390,10 +1390,10 @@ <h4 id="_map">6.5.5. Map</h4> </div> </div> <div class="sect1"> -<h2 id="_syntax_sugar">7. Syntax sugar</h2> +<h2 id="syntax-sugar"><a class="link" href="#syntax-sugar">Syntax sugar</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_mlet">7.1. mlet</h3> +<h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> <div class="paragraph"> <p>For convenience when using the monadic bind the <code>mlet</code> macro is implemented in cats. If you’ve followed along with the documentation you’ve seen many examples of its usage already, let’s see what can <code>mlet</code> do.</p> @@ -1480,7 +1480,7 @@ <h3 id="_mlet">7.1. mlet</h3> </div> </div> <div class="sect2"> -<h3 id="_alet">7.2. alet</h3> +<h3 id="alet"><a class="link" href="#alet">alet</a></h3> <div class="paragraph"> <p>One limitation of monadic bind is that all the steps are strictly sequential and happen one at a time. This piece of code illustrates the usage of monadic bind:</p> @@ -1612,10 +1612,10 @@ <h3 id="_alet">7.2. alet</h3> </div> </div> <div class="sect1"> -<h2 id="_higher_order_functions">8. Higher-order functions</h2> +<h2 id="higher-order-functions"><a class="link" href="#higher-order-functions">Higher-order functions</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_curry">8.1. curry</h3> +<h3 id="curry"><a class="link" href="#curry">curry</a></h3> <div class="paragraph"> <p>The first combinator that <em>cats</em> provides is a <code>curry</code> macro. Given a function, it can convert it to a curried versions of itself. The generated function will accept parameters until all the expected parameters are given. @@ -1699,7 +1699,7 @@ <h3 id="_curry">8.1. curry</h3> </div> </div> <div class="sect2"> -<h3 id="_lift_m">8.2. lift-m</h3> +<h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> <div class="paragraph"> <p>The <code>lift-m</code> macro is a combinator for promoting functions that work on regular values to work on monadic values instead. It uses the monad’s bind operation under the hood and, like <code>curry</code>, can be used without specifying arity @@ -1771,7 +1771,7 @@ <h3 id="_lift_m">8.2. lift-m</h3> </div> </div> <div class="sect1"> -<h2 id="_labs">9. Labs</h2> +<h2 id="labs"><a class="link" href="#labs">Labs</a></h2> <div class="sectionbody"> <div class="paragraph"> <p>This section intends to explain different kind of extra features that can be found under @@ -1782,7 +1782,7 @@ <h2 id="_labs">9. Labs</h2> <p>In any case the state of each module will be notified on the start of the each section.</p> </div> <div class="sect2"> -<h3 id="_channel">9.1. Channel</h3> +<h3 id="channel"><a class="link" href="#channel">Channel</a></h3> <div class="paragraph"> <p><strong>Status:</strong> Experimental</p> </div> @@ -1929,7 +1929,7 @@ <h3 id="_channel">9.1. Channel</h3> </div> </div> <div class="sect2"> -<h3 id="_manifold_deferred">9.2. Manifold Deferred</h3> +<h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold Deferred</a></h3> <div class="paragraph"> <p><strong>Status:</strong> Experimental</p> </div> @@ -2012,7 +2012,7 @@ <h3 id="_manifold_deferred">9.2. Manifold Deferred</h3> </div> </div> <div class="sect2"> -<h3 id="_state">9.3. State</h3> +<h3 id="state"><a class="link" href="#state">State</a></h3> <div class="paragraph"> <p><strong>Status:</strong> Experimental</p> </div> @@ -2104,7 +2104,7 @@ <h3 id="_state">9.3. State</h3> </div> </div> <div class="sect2"> -<h3 id="_reader">9.4. Reader</h3> +<h3 id="reader"><a class="link" href="#reader">Reader</a></h3> <div class="paragraph"> <p><strong>Status:</strong> Experimental</p> </div> @@ -2195,7 +2195,7 @@ <h3 id="_reader">9.4. Reader</h3> </div> </div> <div class="sect2"> -<h3 id="_writer">9.5. Writer</h3> +<h3 id="writer"><a class="link" href="#writer">Writer</a></h3> <div class="paragraph"> <p><strong>Status:</strong> Experimental</p> </div> @@ -2204,7 +2204,7 @@ <h3 id="_writer">9.5. Writer</h3> </div> </div> <div class="sect2"> -<h3 id="_continuation">9.6. Continuation</h3> +<h3 id="continuation"><a class="link" href="#continuation">Continuation</a></h3> <div class="paragraph"> <p><strong>Status:</strong> Experimental</p> </div> @@ -2215,7 +2215,7 @@ <h3 id="_continuation">9.6. Continuation</h3> </div> </div> <div class="sect1"> -<h2 id="_complementary_libraries">10. Complementary libraries</h2> +<h2 id="complementary-libraries"><a class="link" href="#complementary-libraries">Complementary libraries</a></h2> <div class="sectionbody"> <div class="paragraph"> <p>Some monads are defined as separated package to avoid additional @@ -2238,10 +2238,10 @@ <h2 id="_complementary_libraries">10. Complementary libraries</h2> </div> </div> <div class="sect1"> -<h2 id="_faq">11. FAQ</h2> +<h2 id="faq"><a class="link" href="#faq">FAQ</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions">11.1. What Clojure types implement some of the Category Theory abstractions?</h3> +<h3 id="what-clojure-types-implement-some-of-the-category-theory-abstractions"><a class="link" href="#what-clojure-types-implement-some-of-the-category-theory-abstractions">What Clojure types implement some of the Category Theory abstractions?</a></h3> <div class="paragraph"> <p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types that don’t act like containers. For example, Clojure keywords are values but can not be containers so @@ -2282,10 +2282,10 @@ <h3 id="_what_clojure_types_implement_some_of_the_category_theory_abstractions"> </div> </div> <div class="sect1"> -<h2 id="_developers_guide">12. Developers Guide</h2> +<h2 id="developers-guide"><a class="link" href="#developers-guide">Developers Guide</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_philosophy">12.1. Philosophy</h3> +<h3 id="philosophy"><a class="link" href="#philosophy">Philosophy</a></h3> <div class="paragraph"> <p>Five most important rules:</p> </div> @@ -2313,14 +2313,14 @@ <h3 id="_philosophy">12.1. Philosophy</h3> </div> </div> <div class="sect2"> -<h3 id="_contributing">12.2. Contributing</h3> +<h3 id="contributing"><a class="link" href="#contributing">Contributing</a></h3> <div class="paragraph"> <p>Unlike Clojure and other Clojure contributed libraries, <em>cats</em> does not have many restrictions for contributions. Just open an issue or pull request.</p> </div> </div> <div class="sect2"> -<h3 id="_source_code">12.3. Source Code</h3> +<h3 id="source-code"><a class="link" href="#source-code">Source Code</a></h3> <div class="paragraph"> <p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> </div> @@ -2334,7 +2334,7 @@ <h3 id="_source_code">12.3. Source Code</h3> </div> </div> <div class="sect2"> -<h3 id="_run_tests">12.4. Run tests</h3> +<h3 id="run-tests"><a class="link" href="#run-tests">Run tests</a></h3> <div class="paragraph"> <p>For running tests just execute this:</p> </div> @@ -2345,7 +2345,7 @@ <h3 id="_run_tests">12.4. Run tests</h3> </div> </div> <div class="sect2"> -<h3 id="_license">12.5. License</h3> +<h3 id="license"><a class="link" href="#license">License</a></h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.nz> @@ -2379,10 +2379,10 @@ <h3 id="_license">12.5. License</h3> </div> </div> <div class="sect1"> -<h2 id="_editor_integration">13. Editor integration</h2> +<h2 id="editor-integration"><a class="link" href="#editor-integration">Editor integration</a></h2> <div class="sectionbody"> <div class="sect2"> -<h3 id="_emacs">13.1. Emacs</h3> +<h3 id="emacs"><a class="link" href="#emacs">Emacs</a></h3> <div class="paragraph"> <p>For making Emacs' clojure-mode treat <code>alet</code>, <code>mlet</code> et al like a <code>let</code> and indent them correctly, you can use <code>define-clojure-indent</code> like in the following example:</p> @@ -2402,7 +2402,7 @@ <h3 id="_emacs">13.1. Emacs</h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-09-17 13:09:36 CEST +Last updated 2015-09-17 17:31:44 EEST </div> </div> </body> From 715945e725047bd0ef8b0d8d22345b024edc6eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Sat, 26 Sep 2015 13:29:16 +0200 Subject: [PATCH 45/52] Generate documentation --- latest/api/cats.applicative.validation.html | 2 +- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 2 +- latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 +- latest/api/cats.labs.continuation.html | 2 +- latest/api/cats.labs.manifold.html | 2 +- latest/api/cats.labs.reader.html | 2 +- latest/api/cats.labs.state.html | 2 +- latest/api/cats.labs.writer.html | 2 +- latest/api/cats.monad.continuation.html | 2 - latest/api/cats.monad.either.html | 2 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.html | 2 - latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 2 +- latest/api/cats.monad.reader.html | 2 - latest/api/cats.monad.state.html | 2 - latest/api/cats.monad.writer.html | 2 - latest/api/cats.protocols.html | 2 +- latest/api/index.html | 2 +- latest/api/js/jquery.min.js | 4 - latest/api/js/page_effects.js | 99 --------------------- latest/api/user.html | 2 - latest/index.html | 14 +-- 26 files changed, 24 insertions(+), 139 deletions(-) delete mode 100644 latest/api/cats.monad.continuation.html delete mode 100644 latest/api/cats.monad.html delete mode 100644 latest/api/cats.monad.reader.html delete mode 100644 latest/api/cats.monad.state.html delete mode 100644 latest/api/cats.monad.writer.html delete mode 100644 latest/api/js/jquery.min.js delete mode 100644 latest/api/js/page_effects.js delete mode 100644 latest/api/user.html diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html index afc0991..aecce37 100644 --- a/latest/api/cats.applicative.validation.html +++ b/latest/api/cats.applicative.validation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L201">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L104">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L111">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L194">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L201">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L104">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L111">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L194">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index fb30078..cd35a61 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L314">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L301">view source</a></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L265">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L121">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L49">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L215">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L353">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L327">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L314">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L301">view source</a></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L265">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L121">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L49">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L215">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L353">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L327">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index 9643fff..4964669 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index ee91471..94b7483 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L626">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L630">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L669">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L655">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L661">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L647">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L626">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L630">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L669">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L655">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L661">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L647">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> </code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L634">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L356">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index e92350e..c5f166f 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L79">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L119">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L79">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L119">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html index fad9ace..e5e5861 100644 --- a/latest/api/cats.labs.channel.html +++ b/latest/api/cats.labs.channel.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L51">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L51">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.continuation.html b/latest/api/cats.labs.continuation.html index de48d85..95f3370 100644 --- a/latest/api/cats.labs.continuation.html +++ b/latest/api/cats.labs.continuation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L84">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L59">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L50">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L77">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L84">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L59">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L50">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L77">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html index 9c37951..31d85e8 100644 --- a/latest/api/cats.labs.manifold.html +++ b/latest/api/cats.labs.manifold.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L87">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.reader.html b/latest/api/cats.labs.reader.html index a1f5f42..3ce4a5f 100644 --- a/latest/api/cats.labs.reader.html +++ b/latest/api/cats.labs.reader.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L163">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L169">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L39">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L62">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L116">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L73">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L156">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L163">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L169">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L39">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L62">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L116">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L73">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L156">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.state.html b/latest/api/cats.labs.state.html index d83b986..11b9ba9 100644 --- a/latest/api/cats.labs.state.html +++ b/latest/api/cats.labs.state.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L226">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L235">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L191">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L41">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L123">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L76">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L226">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L235">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L191">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L41">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L123">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L76">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.writer.html b/latest/api/cats.labs.writer.html index 3beb1a1..53ff689 100644 --- a/latest/api/cats.labs.writer.html +++ b/latest/api/cats.labs.writer.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L183">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L194">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L43">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L188">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L193">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L73">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L124">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L183">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L194">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L43">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L188">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L193">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L73">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L124">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.continuation.html b/latest/api/cats.monad.continuation.html deleted file mode 100644 index 94c1afc..0000000 --- a/latest/api/cats.monad.continuation.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L82">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L51">view source</a></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index 2b91123..a06a0c3 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index bf41d2e..b1b640b 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.html b/latest/api/cats.monad.html deleted file mode 100644 index 03fe199..0000000 --- a/latest/api/cats.monad.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.7.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 34549d7..97df66d 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L69">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L69">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index b1e6685..13c2460 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) diff --git a/latest/api/cats.monad.reader.html b/latest/api/cats.monad.reader.html deleted file mode 100644 index b60f7e4..0000000 --- a/latest/api/cats.monad.reader.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L155">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L161">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L48">view source</a></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L102">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L147">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.state.html b/latest/api/cats.monad.state.html deleted file mode 100644 index 7350310..0000000 --- a/latest/api/cats.monad.state.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L236">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L246">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L204">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L218">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L53">view source</a></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L117">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L211">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.writer.html b/latest/api/cats.monad.writer.html deleted file mode 100644 index 566852e..0000000 --- a/latest/api/cats.monad.writer.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L165">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L171">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L159">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L177">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L50">view source</a></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L101">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L62">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index b1bf053..671d986 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 12a6cde..9012f31 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.0.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.1.0-SNAPSHOT API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/js/jquery.min.js b/latest/api/js/jquery.min.js deleted file mode 100644 index 73f33fb..0000000 --- a/latest/api/js/jquery.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f -}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) -},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/latest/api/js/page_effects.js b/latest/api/js/page_effects.js deleted file mode 100644 index ef8120d..0000000 --- a/latest/api/js/page_effects.js +++ /dev/null @@ -1,99 +0,0 @@ -function visibleInParent(element) { - var position = $(element).position().top - return position > -50 && position < ($(element).offsetParent().height() - 50) -} - -function hasFragment(link, fragment) { - return $(link).attr("href").indexOf("#" + fragment) != -1 -} - -function findLinkByFragment(elements, fragment) { - return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() -} - -function scrollToCurrentVarLink(elements) { - var elements = $(elements); - var parent = elements.offsetParent(); - - if (elements.length == 0) return; - - var top = elements.first().position().top; - var bottom = elements.last().position().top + elements.last().height(); - - if (top >= 0 && bottom <= parent.height()) return; - - if (top < 0) { - parent.scrollTop(parent.scrollTop() + top); - } - else if (bottom > parent.height()) { - parent.scrollTop(parent.scrollTop() + bottom - parent.height()); - } -} - -function setCurrentVarLink() { - $('#vars a').parent().removeClass('current') - $('.anchor'). - filter(function(index) { return visibleInParent(this) }). - each(function(index, element) { - findLinkByFragment("#vars a", element.id). - parent(). - addClass('current') - }); - scrollToCurrentVarLink('#vars .current'); -} - -var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) - -function scrollPositionId(element) { - var directory = window.location.href.replace(/[^\/]+\.html$/, '') - return 'scroll::' + $(element).attr('id') + '::' + directory -} - -function storeScrollPosition(element) { - if (!hasStorage) return; - localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) - localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) -} - -function recallScrollPosition(element) { - if (!hasStorage) return; - $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) - $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) -} - -function persistScrollPosition(element) { - recallScrollPosition(element) - $(element).scroll(function() { storeScrollPosition(element) }) -} - -function sidebarContentWidth(element) { - var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) - return Math.max.apply(Math, widths) -} - -function resizeSidebars() { - var nsWidth = sidebarContentWidth('#namespaces') + 30 - var varWidth = 0 - - if ($('#vars').length != 0) { - varWidth = sidebarContentWidth('#vars') + 30 - } - - // snap to grid - var snap = 30; - nsWidth = Math.ceil(nsWidth / snap) * snap; - varWidth = Math.ceil(varWidth / snap) * snap; - - $('#namespaces').css('width', nsWidth) - $('#vars').css('width', varWidth) - $('#vars, .namespace-index').css('left', nsWidth + 1) - $('.namespace-docs').css('left', nsWidth + varWidth + 2) -} - -$(window).ready(resizeSidebars) -$(window).ready(setCurrentVarLink) -$(window).ready(function() { persistScrollPosition('#namespaces')}) -$(window).ready(function() { - $('#content').scroll(setCurrentVarLink) - $(window).resize(setCurrentVarLink) -}) diff --git a/latest/api/user.html b/latest/api/user.html deleted file mode 100644 index d1c93a5..0000000 --- a/latest/api/user.html +++ /dev/null @@ -1,2 +0,0 @@ -<!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>user documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1 current"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">user</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index f7cd834..0151d92 100644 --- a/latest/index.html +++ b/latest/index.html @@ -233,7 +233,7 @@ <h2 id="rationale"><a class="link" href="#rationale">Rationale</a></h2> <h2 id="project-maturity"><a class="link" href="#project-maturity">Project Maturity</a></h2> <div class="sectionbody"> <div class="paragraph"> -<p>Since <em>cats</em> is a young project, there can be some <a href="api/index.html#id">API</a> breakage.</p> +<p><em>cats</em> already reached the 1.0.0 version and the <a href="api/index.html#id">API</a> is settled.</p> </div> </div> </div> @@ -390,7 +390,7 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <p>Let’s see an example of applying fmap over a Clojure vector:</p> </div> <div class="listingblock"> -<div class="title">Example using fmav over <strong>vector</strong>.</div> +<div class="title">Example using fmap over <strong>vector</strong>.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> @@ -970,14 +970,14 @@ <h4 id="using-monad-transformers"><a class="link" href="#using-monad-transformer <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.data</span> <span class="tok-ss">:as</span> <span class="tok-nv">data</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">cats.context</span> <span class="tok-ss">:as</span> <span class="tok-nv">ctx</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-nv">cats.labs.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">))</span> + <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/context</span><span class="tok-p">))</span> -<span class="tok-p">(</span><span class="tok-nf">m/with-monad</span> <span class="tok-nv">maybe-state</span> +<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe-state</span> <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> <span class="tok-c1">;; => #<Just #<Pair [42 {}]>></span></code></pre> </div> @@ -987,7 +987,7 @@ <h4 id="using-monad-transformers"><a class="link" href="#using-monad-transformer function that yields a Maybe containing a pair (value, next state).</p> </div> <div class="paragraph"> -<p>You probably noticed that we had to wrap the state function invocation with <code>cats.core/with-monad</code>. +<p>You probably noticed that we had to wrap the state function invocation with <code>cats.context/with-context</code>. When working with monad transformers, we have to be explicit about what monad we are using to implement the binding policy since there is no way to distinguish values from a transformer type from those of a regular monad.</p> @@ -2402,7 +2402,7 @@ <h3 id="emacs"><a class="link" href="#emacs">Emacs</a></h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-09-17 17:31:44 EEST +Last updated 2015-09-26 13:23:53 CEST </div> </div> </body> From 4b161981a5897c6b70a4c6f2a1f17b627a5e4817 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Sun, 4 Oct 2015 08:24:40 +0200 Subject: [PATCH 46/52] Generate documentation --- latest/api/cats.core.html | 24 +++--- latest/api/cats.monad.continuation.html | 2 + latest/api/cats.monad.html | 2 + latest/api/cats.monad.reader.html | 2 + latest/api/cats.monad.state.html | 2 + latest/api/cats.monad.writer.html | 2 + latest/api/js/jquery.min.js | 4 + latest/api/js/page_effects.js | 99 +++++++++++++++++++++++++ latest/api/user.html | 2 + latest/index.html | 4 +- 10 files changed, 129 insertions(+), 14 deletions(-) create mode 100644 latest/api/cats.monad.continuation.html create mode 100644 latest/api/cats.monad.html create mode 100644 latest/api/cats.monad.reader.html create mode 100644 latest/api/cats.monad.state.html create mode 100644 latest/api/cats.monad.writer.html create mode 100644 latest/api/js/jquery.min.js create mode 100644 latest/api/js/page_effects.js create mode 100644 latest/api/user.html diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index 94b7483..c476a5f 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,12 +1,12 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L626">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L630">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L669">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L655">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L661">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L647">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L628">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L632">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L671">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L686">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L657">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L663">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L649">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L634">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L356">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L636">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L358">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> <pre><code>(bind (either/right 1) (fn [v] (return (inc v)))) ;; => #<Right [2]> -</code></pre><p>For convenience, you may prefer to use the <code>mlet</code> macro, which provides a beautiful, <code>let</code>-like syntax for composing operations with the <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L81">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function, return another which is curried.</p><p>With inferred arity (function must have one fixed arity):</p> +</code></pre><p>For convenience, you may prefer to use the <code>mlet</code> macro, which provides a beautiful, <code>let</code>-like syntax for composing operations with the <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L83">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function, return another which is curried.</p><p>With inferred arity (function must have one fixed arity):</p> <pre><code>(defn add2 [x y] (+ x y)) (def cadd2 (curry add2)) @@ -23,7 +23,7 @@ ((((c+) 1) 2) 3) ;; => 6 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L455">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L438">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L531">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L678">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L132">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L457">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L440">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L533">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L680">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L134">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -32,7 +32,7 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L602">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L693">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L604">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L124">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L695">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> <pre><code>(require '[cats.context :as ctx] '[cats.core :as m] '[cats.monad.maybe :as maybe]) @@ -56,7 +56,7 @@ (ctx/with-context maybe/context (foldm m-div 1 [])) ;; => #<Just 1> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L700">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L686">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L702">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L688">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> </code></pre><p>Yet an other example that fails:</p> @@ -66,7 +66,7 @@ (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L582">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L165">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L496">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L584">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L112">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L118">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L167">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L498">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L50">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -79,7 +79,7 @@ (maybe/nothing))) [1 2]) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L561">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L563">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L46">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) @@ -91,20 +91,20 @@ b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L176">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L178">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L106">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L100">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> <pre><code>(with-context either/context (pure 1)) ;; => #<Right [1]> (pure either/context 1) ;; => #<Right [1]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L54">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L75">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L56">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L77">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> <pre><code>(sequence [(maybe/just 2) (maybe/just 3)]) ;; => <Just [[2, 3]]> (sequence [(maybe/nothing) (maybe/just 3)]) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L540">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L542">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> <pre><code>(defn inc-if-even [n] (if (even? n) @@ -114,4 +114,4 @@ (ctx/with-context maybe/context (m/traverse inc-if-even [2 4])) ;; => #<Just [3 4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L742">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L156">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L145">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L744">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L158">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L147">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.continuation.html b/latest/api/cats.monad.continuation.html new file mode 100644 index 0000000..94c1afc --- /dev/null +++ b/latest/api/cats.monad.continuation.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L82">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L51">view source</a></div></div><div class="public anchor" id="var-continuation-monad"><h3><a href="#var-continuation-monad">continuation-monad</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/continuation.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.html b/latest/api/cats.monad.html new file mode 100644 index 0000000..03fe199 --- /dev/null +++ b/latest/api/cats.monad.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.7.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2 current"><a href="cats.monad.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.reader.html b/latest/api/cats.monad.reader.html new file mode 100644 index 0000000..b60f7e4 --- /dev/null +++ b/latest/api/cats.monad.reader.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -269px;"><span class="top" style="height: 278px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L155">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L161">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L48">view source</a></div></div><div class="public anchor" id="var-reader-transformer"><h3><a href="#var-reader-transformer">reader-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L102">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L60">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/reader.cljc#L147">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.state.html b/latest/api/cats.monad.state.html new file mode 100644 index 0000000..7350310 --- /dev/null +++ b/latest/api/cats.monad.state.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L236">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L246">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L204">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L218">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-t f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L53">view source</a></div></div><div class="public anchor" id="var-state-transformer"><h3><a href="#var-state-transformer">state-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L117">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/state.cljc#L211">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.writer.html b/latest/api/cats.monad.writer.html new file mode 100644 index 0000000..566852e --- /dev/null +++ b/latest/api/cats.monad.writer.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.5.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.monad.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L165">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L171">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L159">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L177">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L50">view source</a></div></div><div class="public anchor" id="var-writer-transformer"><h3><a href="#var-writer-transformer">writer-transformer</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer-transformer inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L101">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/writer.cljc#L62">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/js/jquery.min.js b/latest/api/js/jquery.min.js new file mode 100644 index 0000000..73f33fb --- /dev/null +++ b/latest/api/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f +}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) +},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n}); diff --git a/latest/api/js/page_effects.js b/latest/api/js/page_effects.js new file mode 100644 index 0000000..ef8120d --- /dev/null +++ b/latest/api/js/page_effects.js @@ -0,0 +1,99 @@ +function visibleInParent(element) { + var position = $(element).position().top + return position > -50 && position < ($(element).offsetParent().height() - 50) +} + +function hasFragment(link, fragment) { + return $(link).attr("href").indexOf("#" + fragment) != -1 +} + +function findLinkByFragment(elements, fragment) { + return $(elements).filter(function(i, e) { return hasFragment(e, fragment)}).first() +} + +function scrollToCurrentVarLink(elements) { + var elements = $(elements); + var parent = elements.offsetParent(); + + if (elements.length == 0) return; + + var top = elements.first().position().top; + var bottom = elements.last().position().top + elements.last().height(); + + if (top >= 0 && bottom <= parent.height()) return; + + if (top < 0) { + parent.scrollTop(parent.scrollTop() + top); + } + else if (bottom > parent.height()) { + parent.scrollTop(parent.scrollTop() + bottom - parent.height()); + } +} + +function setCurrentVarLink() { + $('#vars a').parent().removeClass('current') + $('.anchor'). + filter(function(index) { return visibleInParent(this) }). + each(function(index, element) { + findLinkByFragment("#vars a", element.id). + parent(). + addClass('current') + }); + scrollToCurrentVarLink('#vars .current'); +} + +var hasStorage = (function() { try { return localStorage.getItem } catch(e) {} }()) + +function scrollPositionId(element) { + var directory = window.location.href.replace(/[^\/]+\.html$/, '') + return 'scroll::' + $(element).attr('id') + '::' + directory +} + +function storeScrollPosition(element) { + if (!hasStorage) return; + localStorage.setItem(scrollPositionId(element) + "::x", $(element).scrollLeft()) + localStorage.setItem(scrollPositionId(element) + "::y", $(element).scrollTop()) +} + +function recallScrollPosition(element) { + if (!hasStorage) return; + $(element).scrollLeft(localStorage.getItem(scrollPositionId(element) + "::x")) + $(element).scrollTop(localStorage.getItem(scrollPositionId(element) + "::y")) +} + +function persistScrollPosition(element) { + recallScrollPosition(element) + $(element).scroll(function() { storeScrollPosition(element) }) +} + +function sidebarContentWidth(element) { + var widths = $(element).find('.inner').map(function() { return $(this).innerWidth() }) + return Math.max.apply(Math, widths) +} + +function resizeSidebars() { + var nsWidth = sidebarContentWidth('#namespaces') + 30 + var varWidth = 0 + + if ($('#vars').length != 0) { + varWidth = sidebarContentWidth('#vars') + 30 + } + + // snap to grid + var snap = 30; + nsWidth = Math.ceil(nsWidth / snap) * snap; + varWidth = Math.ceil(varWidth / snap) * snap; + + $('#namespaces').css('width', nsWidth) + $('#vars').css('width', varWidth) + $('#vars, .namespace-index').css('left', nsWidth + 1) + $('.namespace-docs').css('left', nsWidth + varWidth + 2) +} + +$(window).ready(resizeSidebars) +$(window).ready(setCurrentVarLink) +$(window).ready(function() { persistScrollPosition('#namespaces')}) +$(window).ready(function() { + $('#content').scroll(setCurrentVarLink) + $(window).resize(setCurrentVarLink) +}) diff --git a/latest/api/user.html b/latest/api/user.html new file mode 100644 index 0000000..d1c93a5 --- /dev/null +++ b/latest/api/user.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>user documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 0.6.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><a href="cats.monad.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>monad</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-1 current"><a href="user.html"><div class="inner"><span class="tree" style="top: -393px;"><span class="top" style="height: 402px;"></span><span class="bottom"></span></span><span>user</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">user</h2><div class="doc"><div class="markdown"></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 0151d92..fe2e016 100644 --- a/latest/index.html +++ b/latest/index.html @@ -595,7 +595,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/foldl</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">%1</span> <span class="tok-nv">%2</span><span class="tok-p">))</span> <span class="tok-mi">1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Just 1></span> +<span class="tok-c1">;; => #<Just 2></span> <span class="tok-p">(</span><span class="tok-nf">m/foldl</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">%1</span> <span class="tok-nv">%2</span><span class="tok-p">))</span> <span class="tok-mi">1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> <span class="tok-c1">;; => 1</span></code></pre> @@ -2402,7 +2402,7 @@ <h3 id="emacs"><a class="link" href="#emacs">Emacs</a></h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-09-26 13:23:53 CEST +Last updated 2015-10-04 09:24:04 EEST </div> </div> </body> From 1a8a779c15ee20a379fe1aca9558037829fee46d Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Thu, 26 Nov 2015 22:51:42 +0200 Subject: [PATCH 47/52] Generate documentation --- latest/api/cats.applicative.validation.html | 2 +- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 51 +- latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 +- latest/api/cats.labs.continuation.html | 2 +- latest/api/cats.labs.crdt.gcounter.html | 2 + latest/api/cats.labs.crdt.gset.html | 2 + latest/api/cats.labs.crdt.html | 2 + latest/api/cats.labs.crdt.pncounter.html | 2 + latest/api/cats.labs.crdt.protocols.html | 2 + latest/api/cats.labs.crdt.util.html | 2 + latest/api/cats.labs.lens.html | 2 + latest/api/cats.labs.manifold.html | 2 +- latest/api/cats.labs.reader.html | 2 +- latest/api/cats.labs.state.html | 2 +- latest/api/cats.labs.sugar.html | 2 + latest/api/cats.labs.writer.html | 2 +- latest/api/cats.monad.either.html | 4 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 6 +- latest/api/cats.protocols.html | 2 +- latest/api/cats.util.html | 2 + latest/api/index.html | 2 +- latest/index.html | 1037 +++++++++++++------ 27 files changed, 786 insertions(+), 358 deletions(-) create mode 100644 latest/api/cats.labs.crdt.gcounter.html create mode 100644 latest/api/cats.labs.crdt.gset.html create mode 100644 latest/api/cats.labs.crdt.html create mode 100644 latest/api/cats.labs.crdt.pncounter.html create mode 100644 latest/api/cats.labs.crdt.protocols.html create mode 100644 latest/api/cats.labs.crdt.util.html create mode 100644 latest/api/cats.labs.lens.html create mode 100644 latest/api/cats.labs.sugar.html create mode 100644 latest/api/cats.util.html diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html index aecce37..1a4e7ea 100644 --- a/latest/api/cats.applicative.validation.html +++ b/latest/api/cats.applicative.validation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L201">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L104">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L99">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L111">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L194">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L213">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L110">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L105">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L206">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L129">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index cd35a61..ef01965 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L314">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L301">view source</a></div></div><div class="public anchor" id="var-map-monoid"><h3><a href="#var-map-monoid">map-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L265">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L121">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L49">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L215">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L353">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L327">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L423">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L404">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L355">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L234">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L461">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L128">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L299">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L480">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L442">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L159">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index 4964669..2adab38 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index c476a5f..a5c3b16 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,12 +1,12 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L628">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L632">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L671">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L686">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L657">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L663">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L649">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L641">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L645">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L699">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L670">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L676">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L662">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L636">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L358">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L649">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L357">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> <pre><code>(bind (either/right 1) (fn [v] (return (inc v)))) ;; => #<Right [2]> -</code></pre><p>For convenience, you may prefer to use the <code>mlet</code> macro, which provides a beautiful, <code>let</code>-like syntax for composing operations with the <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L83">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function, return another which is curried.</p><p>With inferred arity (function must have one fixed arity):</p> +</code></pre><p>For convenience, you may prefer to use the <code>mlet</code> macro, which provides a beautiful, <code>let</code>-like syntax for composing operations with the <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L81">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function, return another which is curried.</p><p>With inferred arity (function must have one fixed arity):</p> <pre><code>(defn add2 [x y] (+ x y)) (def cadd2 (curry add2)) @@ -23,7 +23,7 @@ ((((c+) 1) 2) 3) ;; => 6 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L457">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L440">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L533">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L680">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L134">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L456">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L439">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L532">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L693">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L133">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -32,7 +32,7 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L604">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L124">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L695">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L617">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L708">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> <pre><code>(require '[cats.context :as ctx] '[cats.core :as m] '[cats.monad.maybe :as maybe]) @@ -56,7 +56,7 @@ (ctx/with-context maybe/context (foldm m-div 1 [])) ;; => #<Just 1> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L702">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L688">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L715">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L701">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> </code></pre><p>Yet an other example that fails:</p> @@ -66,9 +66,10 @@ (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L584">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L112">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L118">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L167">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L498">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L50">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> -<pre><code>(require '[cats.monad.maybe :as maybe]) -(require '[cats.core :as m]) +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L597">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L166">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L497">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> +<pre><code>(require '[cats.context :as ctx] + '[cats.monad.maybe :as maybe] + '[cats.core :as m]) (m/mapseq maybe/just [2 3]) ;=> <Just [[2 3]]> @@ -78,8 +79,12 @@ (maybe/just v) (maybe/nothing))) [1 2]) -;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L563">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L46">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> +;; => #<Nothing> + +(ctx/with-context maybe/context + (mapseq #(maybe/just (* % 2)) [])) +;; => #<Just [()]> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L571">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) @@ -91,20 +96,28 @@ b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L178">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L106">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L100">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L177">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> <pre><code>(with-context either/context (pure 1)) ;; => #<Right [1]> (pure either/context 1) ;; => #<Right [1]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L56">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L77">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a non-empty collection of monadic values, collect their values in a vector returned in the monadic context.</p> -<pre><code>(sequence [(maybe/just 2) (maybe/just 3)]) -;; => <Just [[2, 3]]> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L54">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L75">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a collection of monadic values, collect their values in a seq returned in the monadic context.</p> +<pre><code>(require '[cats.context :as ctx] + '[cats.monad.maybe :as maybe] + '[cats.core :as m]) -(sequence [(maybe/nothing) (maybe/just 3)]) -;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L542">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> +(m/sequence [(maybe/just 2) (maybe/just 3)]) +;; => #<Just [[2, 3]]> + +(m/sequence [(maybe/nothing) (maybe/just 3)]) +;; => #<Nothing> + +(ctx/with-context maybe/context + (m/sequence [])) +;; => #<Just [()]> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L541">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> <pre><code>(defn inc-if-even [n] (if (even? n) @@ -114,4 +127,4 @@ (ctx/with-context maybe/context (m/traverse inc-if-even [2 4])) ;; => #<Just [3 4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L744">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L158">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L147">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L757">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L157">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index c5f166f..c6d5e14 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L79">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L119">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L122">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html index e5e5861..1a8eb7c 100644 --- a/latest/api/cats.labs.channel.html +++ b/latest/api/cats.labs.channel.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L51">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L43">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.continuation.html b/latest/api/cats.labs.continuation.html index 95f3370..76d8f08 100644 --- a/latest/api/cats.labs.continuation.html +++ b/latest/api/cats.labs.continuation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L84">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L59">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L50">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L77">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L92">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L61">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L52">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L85">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.gcounter.html b/latest/api/cats.labs.crdt.gcounter.html new file mode 100644 index 0000000..cca3d8d --- /dev/null +++ b/latest/api/cats.labs.crdt.gcounter.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.gcounter documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.gcounter</h2><div class="doc"><div class="markdown"><p>A G-Counter is a grow-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current actor.</p><p>Divergent histories are resolved by taking the maximum count for each actor (like a vector clock merge). The value of the counter is the sum of all actor counts.</p></div></div><div class="public anchor" id="var--.3EGCounter"><h3><a href="#var--.3EGCounter">->GCounter</a></h3><div class="usage"><code>(->GCounter e node)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.gcounter.GCounter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L13">view source</a></div></div><div class="public anchor" id="var-gcounter"><h3><a href="#var-gcounter">gcounter</a></h3><div class="usage"><code>(gcounter)</code><code>(gcounter node)</code></div><div class="doc"><div class="markdown"><p>A G-Counter data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L62">view source</a></div></div><div class="public anchor" id="var-gcounter*"><h3><a href="#var-gcounter*">gcounter*</a></h3><div class="usage"><code>(gcounter* data node)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L57">view source</a></div></div><div class="public anchor" id="var-gcounter.3F"><h3><a href="#var-gcounter.3F">gcounter?</a></h3><div class="usage"><code>(gcounter? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is a instance of GCounter type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L51">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.gset.html b/latest/api/cats.labs.crdt.gset.html new file mode 100644 index 0000000..7fddf7b --- /dev/null +++ b/latest/api/cats.labs.crdt.gset.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.gset documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.gset</h2><div class="doc"><div class="markdown"><p>Set union is commutative and convergent; hence it is always safe to have simultaneous writes to a set which only allows addition. You cannot remove an element of a G-Set.</p></div></div><div class="public anchor" id="var--.3EGSet"><h3><a href="#var--.3EGSet">->GSet</a></h3><div class="usage"><code>(->GSet s)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.gset.GSet.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L55">view source</a></div></div><div class="public anchor" id="var-gset"><h3><a href="#var-gset">gset</a></h3><div class="usage"><code>(gset)</code><code>(gset data)</code></div><div class="doc"><div class="markdown"><p>A g-set data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L132">view source</a></div></div><div class="public anchor" id="var-gset*"><h3><a href="#var-gset*">gset*</a></h3><div class="usage"><code>(gset* data)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L124">view source</a></div></div><div class="public anchor" id="var-gset.3F"><h3><a href="#var-gset.3F">gset?</a></h3><div class="usage"><code>(gset? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L120">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.html b/latest/api/cats.labs.crdt.html new file mode 100644 index 0000000..48e2426 --- /dev/null +++ b/latest/api/cats.labs.crdt.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 current"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--decode"><h3><a href="#var--decode">-decode</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L66">view source</a></div></div><div class="public anchor" id="var--encode"><h3><a href="#var--encode">-encode</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L65">view source</a></div></div><div class="public anchor" id="var--load"><h3><a href="#var--load">-load</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L64">view source</a></div></div><div class="public anchor" id="var-dec"><h3><a href="#var-dec">dec</a></h3><div class="usage"><code>(dec owner)</code></div><div class="doc"><div class="markdown"><p>A shortcut for <code>(inc-by counter -1)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L25">view source</a></div></div><div class="public anchor" id="var-decode"><h3><a href="#var-decode">decode</a></h3><div class="usage"><code>(decode data)</code><code>(decode data format)</code></div><div class="doc"><div class="markdown"><p>Deserialize crdt data type.</p><p>Only edn format is supported out of the box. This apo is extensible.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L101">view source</a></div></div><div class="public anchor" id="var-encode"><h3><a href="#var-encode">encode</a></h3><div class="usage"><code>(encode data)</code><code>(encode data format)</code></div><div class="doc"><div class="markdown"><p>Serialize crdt data type.</p><p>Only edn format is supported out of the box. This api is extensible.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L91">view source</a></div></div><div class="public anchor" id="var-inc"><h3><a href="#var-inc">inc</a></h3><div class="usage"><code>(inc owner)</code></div><div class="doc"><div class="markdown"><p>Increment the counter value in 1.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L15">view source</a></div></div><div class="public anchor" id="var-inc-by"><h3><a href="#var-inc-by">inc-by</a></h3><div class="usage"><code>(inc-by owner v)</code></div><div class="doc"><div class="markdown"><p>Increment the counter value in <code>v</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L20">view source</a></div></div><div class="public anchor" id="var-ISerializable"><h3><a href="#var-ISerializable">ISerializable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--dump"><h3><a href="#var--dump">-dump</a></h3><div class="usage"><code>(-dump _)</code></div><div class="doc"><div class="markdown"><p>Get plain representation of the data type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L45">view source</a></div></div><div class="public anchor" id="var-merge"><h3><a href="#var-merge">merge</a></h3><div class="usage"><code>(merge owner other)</code></div><div class="doc"><div class="markdown"><p>Converge two data structures. Both provided data types should satify the JoinSemiLattice protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L34">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.pncounter.html b/latest/api/cats.labs.crdt.pncounter.html new file mode 100644 index 0000000..fe7f52c --- /dev/null +++ b/latest/api/cats.labs.crdt.pncounter.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.pncounter documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.pncounter</h2><div class="doc"><div class="markdown"><p>PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as internal G-Counters.</p><p>Merge is handled by merging the internal P and N counters. The value of the counter is the value of the P counter minus the value of the N counter.</p></div></div><div class="public anchor" id="var--.3EPNCounter"><h3><a href="#var--.3EPNCounter">->PNCounter</a></h3><div class="usage"><code>(->PNCounter p n)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.pncounter.PNCounter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L18">view source</a></div></div><div class="public anchor" id="var-pncounter"><h3><a href="#var-pncounter">pncounter</a></h3><div class="usage"><code>(pncounter)</code><code>(pncounter node)</code></div><div class="doc"><div class="markdown"><p>A G-Counter data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L64">view source</a></div></div><div class="public anchor" id="var-pncounter*"><h3><a href="#var-pncounter*">pncounter*</a></h3><div class="usage"><code>(pncounter* data node)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L55">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.protocols.html b/latest/api/cats.labs.crdt.protocols.html new file mode 100644 index 0000000..ed9d733 --- /dev/null +++ b/latest/api/cats.labs.crdt.protocols.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.protocols</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-*node*"><h3><a href="#var-*node*">*node*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/protocols.cljc#L4">view source</a></div></div><div class="public anchor" id="var-ICounter"><h3><a href="#var-ICounter">ICounter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A basic protocol for counters.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--add"><h3><a href="#var--add">-add</a></h3><div class="usage"><code>(-add _ delta)</code></div><div class="doc"><div class="markdown"><p>Add operation in a counter.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/protocols.cljc#L6">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.util.html b/latest/api/cats.labs.crdt.util.html new file mode 100644 index 0000000..dd021b1 --- /dev/null +++ b/latest/api/cats.labs.crdt.util.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4 current"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.util</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-hostname"><h3><a href="#var-hostname">hostname</a></h3><div class="usage"><code>(hostname)</code></div><div class="doc"><div class="markdown"><p>Determines the hostname in the most portable manner.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/util.cljc#L4">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.lens.html b/latest/api/cats.labs.lens.html new file mode 100644 index 0000000..68fde3c --- /dev/null +++ b/latest/api/cats.labs.lens.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.lens documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.lens</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EFoci"><h3><a href="#var--.3EFoci">->Foci</a></h3><div class="usage"><code>(->Foci trav a)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.lens.Foci.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L337">view source</a></div></div><div class="public anchor" id="var--.3EFocus"><h3><a href="#var--.3EFocus">->Focus</a></h3><div class="usage"><code>(->Focus lens a)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.lens.Focus.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L265">view source</a></div></div><div class="public anchor" id="var-both"><h3><a href="#var-both">both</a></h3><div class="usage"><code>(both one other)</code></div><div class="doc"><div class="markdown"><p>Given two traversals, compose them in parallel. The getter of the resulting traversal will combine results from both traversals and the setter will update the state with both setters.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L93">view source</a></div></div><div class="public anchor" id="var-cat"><h3><a href="#var-cat">cat</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L216">view source</a></div></div><div class="public anchor" id="var-const-setter"><h3><a href="#var-const-setter">const-setter</a></h3><div class="usage"><code>(const-setter s _)</code></div><div class="doc"><div class="markdown"><p>The constant setter, returns the state unaltered.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L40">view source</a></div></div><div class="public anchor" id="var-each"><h3><a href="#var-each">each</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A traversal into each element of a sequence.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L209">view source</a></div></div><div class="public anchor" id="var-ffoci"><h3><a href="#var-ffoci">ffoci</a></h3><div class="usage"><code>(ffoci traversal s)</code></div><div class="doc"><div class="markdown"><p>Given a traversal and a state, return the first value focused by the traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L73">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a traversal that focuses the elements that pass the predicate.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L219">view source</a></div></div><div class="public anchor" id="var-foci"><h3><a href="#var-foci">foci</a></h3><div class="usage"><code>(foci traversal s)</code></div><div class="doc"><div class="markdown"><p>Given a traversal and a state, return the values focused by the traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L67">view source</a></div></div><div class="public anchor" id="var-foci-atom"><h3><a href="#var-foci-atom">foci-atom</a></h3><div class="usage"><code>(foci-atom traversal a)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L413">view source</a></div></div><div class="public anchor" id="var-focus"><h3><a href="#var-focus">focus</a></h3><div class="usage"><code>(focus lens s)</code></div><div class="doc"><div class="markdown"><p>Given a lens and a state, return the value focused by the lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L61">view source</a></div></div><div class="public anchor" id="var-focus-atom"><h3><a href="#var-focus-atom">focus-atom</a></h3><div class="usage"><code>(focus-atom lens a)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L409">view source</a></div></div><div class="public anchor" id="var-fst"><h3><a href="#var-fst">fst</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L144">view source</a></div></div><div class="public anchor" id="var-id"><h3><a href="#var-id">id</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L45">view source</a></div></div><div class="public anchor" id="var-id-setter"><h3><a href="#var-id-setter">id-setter</a></h3><div class="usage"><code>(id-setter s f)</code></div><div class="doc"><div class="markdown"><p>The identity setter, applies the function to the state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L35">view source</a></div></div><div class="public anchor" id="var-in"><h3><a href="#var-in">in</a></h3><div class="usage"><code>(in path)</code><code>(in path default)</code></div><div class="doc"><div class="markdown"><p>Given a path and optionally a default value, return a lens that focuses the given path in an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L186">view source</a></div></div><div class="public anchor" id="var-indexed"><h3><a href="#var-indexed">indexed</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L256">view source</a></div></div><div class="public anchor" id="var-it"><h3><a href="#var-it">it</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L49">view source</a></div></div><div class="public anchor" id="var-key"><h3><a href="#var-key">key</a></h3><div class="usage"><code>(key k)</code></div><div class="doc"><div class="markdown"><p>Given a key, returns a lens that focuses on the given key of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L163">view source</a></div></div><div class="public anchor" id="var-keys"><h3><a href="#var-keys">keys</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Focus on the keys of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L238">view source</a></div></div><div class="public anchor" id="var-lens"><h3><a href="#var-lens">lens</a></h3><div class="usage"><code>(lens getter setter)</code></div><div class="doc"><div class="markdown"><p>Given a function for getting the focused value from a state (getter) and a function that takes the state and and update function (setter), constructs a lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L9">view source</a></div></div><div class="public anchor" id="var-lens-.3Etraversal"><h3><a href="#var-lens-.3Etraversal">lens->traversal</a></h3><div class="usage"><code>(lens->traversal l)</code></div><div class="doc"><div class="markdown"><p>Derive a traversal from a lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L200">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity traversal under <code>both</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L53">view source</a></div></div><div class="public anchor" id="var-nth"><h3><a href="#var-nth">nth</a></h3><div class="usage"><code>(nth n)</code></div><div class="doc"><div class="markdown"><p>Given a number, returns a lens that focuses on the given index of a collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L134">view source</a></div></div><div class="public anchor" id="var-only"><h3><a href="#var-only">only</a></h3><div class="usage"><code>(only applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a traversal that filters a coll.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L233">view source</a></div></div><div class="public anchor" id="var-over"><h3><a href="#var-over">over</a></h3><div class="usage"><code>(over st f s)</code></div><div class="doc"><div class="markdown"><p>Given a setter, a function and a state, apply the function over the value focused by the setter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L78">view source</a></div></div><div class="public anchor" id="var-passes"><h3><a href="#var-passes">passes</a></h3><div class="usage"><code>(passes applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a lens that focuses in an element only if passes the predicate.</p><p>The lens is not well-behaved, depens on the outcome of the predicate.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L119">view source</a></div></div><div class="public anchor" id="var-put"><h3><a href="#var-put">put</a></h3><div class="usage"><code>(put st v s)</code></div><div class="doc"><div class="markdown"><p>Given a setter, a new value and a state, replace the value focused by the lens with the new one.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L85">view source</a></div></div><div class="public anchor" id="var-select-keys"><h3><a href="#var-select-keys">select-keys</a></h3><div class="usage"><code>(select-keys ks)</code></div><div class="doc"><div class="markdown"><p>Return a lens focused on the given keys in an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L173">view source</a></div></div><div class="public anchor" id="var-snd"><h3><a href="#var-snd">snd</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L145">view source</a></div></div><div class="public anchor" id="var-tail"><h3><a href="#var-tail">tail</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A lens into the tail of a collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L154">view source</a></div></div><div class="public anchor" id="var-traversal"><h3><a href="#var-traversal">traversal</a></h3><div class="usage"><code>(traversal getter setter)</code></div><div class="doc"><div class="markdown"><p>Given a function for getting the focused values from a state (getter) and a function that takes the state and and update function (setter), constructs a traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L21">view source</a></div></div><div class="public anchor" id="var-units"><h3><a href="#var-units">units</a></h3><div class="usage"><code>(units one->other other->one)</code></div><div class="doc"><div class="markdown"><p>Given a function from unit A to unit B and another in the opposite direction, construct a lens that focuses and updates a converted value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L107">view source</a></div></div><div class="public anchor" id="var-vals"><h3><a href="#var-vals">vals</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Focus on the values of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L247">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html index 31d85e8..e9b0c41 100644 --- a/latest/api/cats.labs.manifold.html +++ b/latest/api/cats.labs.manifold.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L87">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L46">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L92">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.reader.html b/latest/api/cats.labs.reader.html index 3ce4a5f..b977c92 100644 --- a/latest/api/cats.labs.reader.html +++ b/latest/api/cats.labs.reader.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L163">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L169">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L39">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L62">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L116">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L73">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L156">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L175">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L181">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L41">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L64">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L124">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L75">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L168">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.state.html b/latest/api/cats.labs.state.html index 11b9ba9..61c8226 100644 --- a/latest/api/cats.labs.state.html +++ b/latest/api/cats.labs.state.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L226">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L235">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L191">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L41">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L197">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L65">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L123">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L76">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L238">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L247">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L43">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L221">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L67">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L131">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L78">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L215">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.sugar.html b/latest/api/cats.labs.sugar.html new file mode 100644 index 0000000..cf7217d --- /dev/null +++ b/latest/api/cats.labs.sugar.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.sugar documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.sugar</h2><div class="doc"><div class="markdown"><p>Experimental syntax sugar for core abstractions. Sugar that proves its worthiness will graduate to the cats.core namespace.</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p><p>You can think of it as generalizing the <code>some-></code> thread macro to all Monads instead of just Maybe.</p><p>Alternatively, if you think of the regular thread macro as sugar for <code>let</code>:</p><p>(-> :a b (c (other args)) d) => (let [res (b :a) res (c res (other args)) res (d res)] res)</p><p>Then <code>->=</code> is sugar for cats.core/mlet:</p><p>(->= m-a b (c (other args)) d) (mlet [res m-a res (c res (other args)) res (d res)] (return res))</p><p>Note that extra args in this context are assumed pure, and will be evaluated along with the function itself; this also matches the behavior of <code>some-></code> wrt extra args.</p><p>Threading through pure functions is somewhat awkward, but can be done:</p><p>(->= m-a monadic-fn (-> pure-fn other-pure-fn m/return) other-monadic-fn)</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L116">view source</a></div></div><div class="public anchor" id="var--.3E.3E.3D"><h3><a href="#var--.3E.3E.3D">->>=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->>= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like ->>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L161">view source</a></div></div><div class="public anchor" id="var-ap"><h3><a href="#var-ap">ap</a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap f & args)</code></div><div class="doc"><div class="markdown"><p>Apply a pure function to applicative arguments, e.g.</p><p>(ap + (just 1) (just 2) (just 3)) ;; => #<Just [6]> (ap str [“hi” “lo”] [“bye” “woah” “hey”]) ;; => [“hibye” “hiwoah” “hihey” “lobye” “lowoah” “lohey”]</p><p><code>ap</code> is essentially sugar for <code>(apply fapply (pure f) args)</code>, but for the common case where you have a pure, uncurried, possibly variadic function.</p><p><code>ap</code> actually desugars in <code>alet</code> form:</p><p>(macroexpand-1 `(ap + (just 1) (just2))) ;; => (alet [a1 (just 1) a2 (just 2)] (+ a1 a2))</p><p>That way, variadic functions Just Work, without needing to specify an arity separately.</p><p>If you’re familiar with Haskell, this is closest to writing “in Applicative style”: you can straightforwardly convert pure function application to effectful application by with some light syntax (<$> and <*> in case of Haskell, and <code>ap</code> here).</p><p>See the original Applicative paper for more inspiration: <a href="http://staff.city.ac.uk/~ross/papers/Applicative.pdf">http://staff.city.ac.uk/~ross/papers/Applicative.pdf</a></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L35">view source</a></div></div><div class="public anchor" id="var-ap-.3E"><h3><a href="#var-ap-.3E">ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap-> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>-></code>, within an applicative idiom.</p><p>Compare:</p><p>(macroexpand-1 `(-> a b c (d e f))) => (d (c (b a) e f)</p><p>with:</p><p>(macroexpand-1 `(ap-> a b c (d e f)) => (ap d (ap c (ap b a) e f))</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L68">view source</a></div></div><div class="public anchor" id="var-ap-.3E.3E"><h3><a href="#var-ap-.3E.3E">ap->></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap->> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>->></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L91">view source</a></div></div><div class="public anchor" id="var-as-.3E.3D"><h3><a href="#var-as-.3E.3D">as->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(as->= expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>as-></code>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L171">view source</a></div></div><div class="public anchor" id="var-as-ap-.3E"><h3><a href="#var-as-ap-.3E">as-ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(as-ap-> expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>as-></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L104">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.writer.html b/latest/api/cats.labs.writer.html index 53ff689..1655011 100644 --- a/latest/api/cats.labs.writer.html +++ b/latest/api/cats.labs.writer.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L183">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L194">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L43">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L188">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L178">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L193">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L73">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L124">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L195">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L206">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L45">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L200">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L190">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L205">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L75">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L132">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index a06a0c3..f089206 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) @@ -7,4 +7,4 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L226">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L236">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L244">view source</a></div></div><div class="public anchor" id="var-either-t"><h3><a href="#var-either-t">either-t</a></h3><div class="usage"><code>(either-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L196">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L132">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L262">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L266">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L270">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L110">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L120">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L254">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L115">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L126">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L261">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L271">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L279">view source</a></div></div><div class="public anchor" id="var-either-t"><h3><a href="#var-either-t">either-t</a></h3><div class="usage"><code>(either-t inner)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L218">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L138">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L297">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L301">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L305">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L126">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L289">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L121">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L132">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L293">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index b1b640b..acae773 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L180">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L188">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L174">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L143">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L168">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L63">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L69">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L240">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L247">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L253">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L258">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L192">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L64">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L70">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L251">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 97df66d..5f37a22 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L69">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L73">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index 13c2460..d6bf361 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,10 +1,10 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]> -</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L323">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> +</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L337">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> <pre><code>(from-maybe (just 1)) ;=> 1 @@ -13,4 +13,4 @@ (from-maybe (nothing) 42) ;=> 42 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L136">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L109">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L122">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L329">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L290">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L308">view source</a></div></div><div class="public anchor" id="var-maybe-t"><h3><a href="#var-maybe-t">maybe-t</a></h3><div class="usage"><code>(maybe-t inner)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L241">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L101">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L117">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L128">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L300">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L140">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L113">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L126">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L343">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L304">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L322">view source</a></div></div><div class="public anchor" id="var-maybe-t"><h3><a href="#var-maybe-t">maybe-t</a></h3><div class="usage"><code>(maybe-t inner)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L251">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L105">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L121">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L132">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L314">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index 671d986..534bba0 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L82">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L66">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L62">view source</a></div></div><div class="public anchor" id="var-JoinSemiLattice"><h3><a href="#var-JoinSemiLattice">JoinSemiLattice</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A algebraic structure with element joins.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--join"><h3><a href="#var--join">-join</a></h3><div class="usage"><code>(-join _ other)</code></div><div class="doc"><div class="markdown"><p>Converge two data structures.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L108">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L102">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L53">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Just an abstraction for make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L49">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L80">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.util.html b/latest/api/cats.util.html new file mode 100644 index 0000000..9006db8 --- /dev/null +++ b/latest/api/cats.util.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 9012f31..9e0b886 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.1.0-SNAPSHOT API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0-SNAPSHOT</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-map-monoid">map-monoid</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.1.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.html">cats.labs.crdt</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.html#var--decode">-decode</a> </li><li> <a href="cats.labs.crdt.html#var--encode">-encode</a> </li><li> <a href="cats.labs.crdt.html#var--load">-load</a> </li><li> <a href="cats.labs.crdt.html#var-dec">dec</a> </li><li> <a href="cats.labs.crdt.html#var-decode">decode</a> </li><li> <a href="cats.labs.crdt.html#var-encode">encode</a> </li><li> <a href="cats.labs.crdt.html#var-inc">inc</a> </li><li> <a href="cats.labs.crdt.html#var-inc-by">inc-by</a> </li><li> <a href="cats.labs.crdt.html#var-ISerializable">ISerializable</a> </li><li> <a href="cats.labs.crdt.html#var-merge">merge</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gcounter.html">cats.labs.crdt.gcounter</a></h3><div class="doc"><div class="markdown"><p>A G-Counter is a grow-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current actor.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gcounter.html#var--.3EGCounter">->GCounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter">gcounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter*">gcounter*</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter.3F">gcounter?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gset.html">cats.labs.crdt.gset</a></h3><div class="doc"><div class="markdown"><p>Set union is commutative and convergent; hence it is always safe to have simultaneous writes to a set which only allows addition. You cannot remove an element of a G-Set.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gset.html#var--.3EGSet">->GSet</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset">gset</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset*">gset*</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset.3F">gset?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.pncounter.html">cats.labs.crdt.pncounter</a></h3><div class="doc"><div class="markdown"><p>PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as internal G-Counters.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.pncounter.html#var--.3EPNCounter">->PNCounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter">pncounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter*">pncounter*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.protocols.html">cats.labs.crdt.protocols</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.protocols.html#var-*node*">*node*</a> </li><li> <a href="cats.labs.crdt.protocols.html#var-ICounter">ICounter</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.util.html">cats.labs.crdt.util</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.util.html#var-hostname">hostname</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.lens.html">cats.labs.lens</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.lens.html#var--.3EFoci">->Foci</a> </li><li> <a href="cats.labs.lens.html#var--.3EFocus">->Focus</a> </li><li> <a href="cats.labs.lens.html#var-both">both</a> </li><li> <a href="cats.labs.lens.html#var-cat">cat</a> </li><li> <a href="cats.labs.lens.html#var-const-setter">const-setter</a> </li><li> <a href="cats.labs.lens.html#var-each">each</a> </li><li> <a href="cats.labs.lens.html#var-ffoci">ffoci</a> </li><li> <a href="cats.labs.lens.html#var-filter">filter</a> </li><li> <a href="cats.labs.lens.html#var-foci">foci</a> </li><li> <a href="cats.labs.lens.html#var-foci-atom">foci-atom</a> </li><li> <a href="cats.labs.lens.html#var-focus">focus</a> </li><li> <a href="cats.labs.lens.html#var-focus-atom">focus-atom</a> </li><li> <a href="cats.labs.lens.html#var-fst">fst</a> </li><li> <a href="cats.labs.lens.html#var-id">id</a> </li><li> <a href="cats.labs.lens.html#var-id-setter">id-setter</a> </li><li> <a href="cats.labs.lens.html#var-in">in</a> </li><li> <a href="cats.labs.lens.html#var-indexed">indexed</a> </li><li> <a href="cats.labs.lens.html#var-it">it</a> </li><li> <a href="cats.labs.lens.html#var-key">key</a> </li><li> <a href="cats.labs.lens.html#var-keys">keys</a> </li><li> <a href="cats.labs.lens.html#var-lens">lens</a> </li><li> <a href="cats.labs.lens.html#var-lens-.3Etraversal">lens->traversal</a> </li><li> <a href="cats.labs.lens.html#var-nothing">nothing</a> </li><li> <a href="cats.labs.lens.html#var-nth">nth</a> </li><li> <a href="cats.labs.lens.html#var-only">only</a> </li><li> <a href="cats.labs.lens.html#var-over">over</a> </li><li> <a href="cats.labs.lens.html#var-passes">passes</a> </li><li> <a href="cats.labs.lens.html#var-put">put</a> </li><li> <a href="cats.labs.lens.html#var-select-keys">select-keys</a> </li><li> <a href="cats.labs.lens.html#var-snd">snd</a> </li><li> <a href="cats.labs.lens.html#var-tail">tail</a> </li><li> <a href="cats.labs.lens.html#var-traversal">traversal</a> </li><li> <a href="cats.labs.lens.html#var-units">units</a> </li><li> <a href="cats.labs.lens.html#var-vals">vals</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.sugar.html">cats.labs.sugar</a></h3><div class="doc"><div class="markdown"><p>Experimental syntax sugar for core abstractions. Sugar that proves its worthiness will graduate to the cats.core namespace.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.sugar.html#var--.3E.3D">->=</a> </li><li> <a href="cats.labs.sugar.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.labs.sugar.html#var-ap">ap</a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.labs.sugar.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.labs.sugar.html#var-as-ap-.3E">as-ap-></a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-JoinSemiLattice">JoinSemiLattice</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index fe2e016..d19dc14 100644 --- a/latest/index.html +++ b/latest/index.html @@ -80,7 +80,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">1.0.0</span> +<span id="revdate">1.1.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -88,11 +88,7 @@ <h1>Cats Documentation</h1> <li><a href="#introduction">Introduction</a></li> <li><a href="#rationale">Rationale</a></li> <li><a href="#project-maturity">Project Maturity</a></li> -<li><a href="#install">Install</a> -<ul class="sectlevel2"> -<li><a href="#leiningen">Leiningen</a></li> -</ul> -</li> +<li><a href="#install">Install</a></li> <li><a href="#user-guide">User Guide</a> <ul class="sectlevel2"> <li><a href="#semigroup">Semigroup</a></li> @@ -136,6 +132,7 @@ <h1>Cats Documentation</h1> <li><a href="#reader">Reader</a></li> <li><a href="#writer">Writer</a></li> <li><a href="#continuation">Continuation</a></li> +<li><a href="#lens">Lens</a></li> </ul> </li> <li><a href="#complementary-libraries">Complementary libraries</a></li> @@ -148,16 +145,12 @@ <h1>Cats Documentation</h1> <ul class="sectlevel2"> <li><a href="#philosophy">Philosophy</a></li> <li><a href="#contributing">Contributing</a></li> +<li><a href="#editor-integration">Editor integration</a></li> <li><a href="#source-code">Source Code</a></li> <li><a href="#run-tests">Run tests</a></li> <li><a href="#license">License</a></li> </ul> </li> -<li><a href="#editor-integration">Editor integration</a> -<ul class="sectlevel2"> -<li><a href="#emacs">Emacs</a></li> -</ul> -</li> </ul> </div> </div> @@ -197,8 +190,8 @@ <h2 id="rationale"><a class="link" href="#rationale">Rationale</a></h2> cats is licensed under the BSD (2 clauses) license.</p> </li> <li> -<p>We do not intend to only implement monads. Other category theory and algebraic abstractions -are also first class in cats.</p> +<p>We do not intend to only implement monads. Other category theory and algebraic +abstractions are also first class in cats.</p> </li> </ul> </div> @@ -208,19 +201,21 @@ <h2 id="rationale"><a class="link" href="#rationale">Rationale</a></h2> <div class="ulist"> <ul> <li> -<p><strong>algo.monads</strong>: This is the official Clojure library for monads. Its approach for modeling -monads is slightly limited, only supports the monad abstraction and does not have support for -ClojureScript.</p> +<p><strong>algo.monads</strong>: This is the official Clojure library for monads. Its approach +for modeling monads is slightly limited, only supports the monad abstraction and +does not have support for ClojureScript.</p> </li> <li> -<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on being very practical -without taking care of correctness (for example, it extends Clojure types with monadic abstractions -that do not make sense). It has no support for ClojureScript either.</p> +<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on +being very practical without taking care of correctness (for example, it extends +Clojure types with monadic abstractions that do not make sense). It has no +support for ClojureScript either.</p> </li> <li> -<p><strong>monads</strong>: Is the most advanced monads library, supports also functors, applicatives and other -related abstractions. It lacks a good and readable documentation, focus on correctness, has -Haskell like sugar syntax (instead of Clojure like syntax) and does not have support for ClojureScript.</p> +<p><strong>monads</strong>: Is the most advanced monads library, supports also functors, +applicatives and other related abstractions. It lacks a good and readable +documentation, focus on correctness, has Haskell like sugar syntax (instead of +Clojure like syntax) and does not have support for ClojureScript.</p> </li> </ul> </div> @@ -233,7 +228,8 @@ <h2 id="rationale"><a class="link" href="#rationale">Rationale</a></h2> <h2 id="project-maturity"><a class="link" href="#project-maturity">Project Maturity</a></h2> <div class="sectionbody"> <div class="paragraph"> -<p><em>cats</em> already reached the 1.0.0 version and the <a href="api/index.html#id">API</a> is settled.</p> +<p><em>cats</em> already reached the 1.0.0 version and the <a href="api/index.html#id">API</a> is + settled.</p> </div> </div> </div> @@ -241,19 +237,17 @@ <h2 id="project-maturity"><a class="link" href="#project-maturity">Project Matur <h2 id="install"><a class="link" href="#install">Install</a></h2> <div class="sectionbody"> <div class="paragraph"> -<p>This section covers installing <em>cats</em>.</p> -</div> -<div class="sect2"> -<h3 id="leiningen"><a class="link" href="#leiningen">Leiningen</a></h3> -<div class="paragraph"> <p>The simplest way to use <em>cats</em> in a Clojure project is by including it as a dependency in your <strong><em>project.clj</em></strong>:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.0.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.1.0"</span><span class="tok-p">]</span></code></pre> </div> </div> +<div class="paragraph"> +<p>And it works with the following platforms: <strong>jdk7</strong>, <strong>jdk8</strong>, <strong>node</strong> (0.12.7, 4.2.0, +5.0.0).</p> </div> </div> </div> @@ -261,19 +255,20 @@ <h3 id="leiningen"><a class="link" href="#leiningen">Leiningen</a></h3> <h2 id="user-guide"><a class="link" href="#user-guide">User Guide</a></h2> <div class="sectionbody"> <div class="paragraph"> -<p>This section introduces almost all the category theory and algebraic abstractions that the <em>cats</em> library -supports.</p> +<p>This section introduces almost all the category theory and algebraic abstractions +that the <em>cats</em> library supports.</p> </div> <div class="paragraph"> <p>We will use <em>Maybe</em> for the example snippets, because it has support for all -the abstractions and is very easy to understand. You can read more about it in the next -section of this documentation.</p> +the abstractions and is very easy to understand. You can read more about it in +the next section of this documentation.</p> </div> <div class="sect2"> <h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> <div class="paragraph"> -<p>A semigroup is an algebraic structure with an associative binary operation (<code>mappend</code>). Most of the builtin collections -form a semigroup because their associative binary operation is analogous to Clojure’s <code>into</code>.</p> +<p>A semigroup is an algebraic structure with an associative binary operation +(<code>mappend</code>). Most of the builtin collections form a semigroup because their +associative binary operation is analogous to Clojure’s <code>into</code>.</p> </div> <div class="listingblock"> <div class="content"> @@ -284,7 +279,8 @@ <h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> </div> </div> <div class="paragraph"> -<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple <em>Maybe</em> values.</p> +<p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple +<em>Maybe</em> values.</p> </div> <div class="listingblock"> <div class="content"> @@ -300,8 +296,8 @@ <h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> <div class="sect2"> <h3 id="monoid"><a class="link" href="#monoid">Monoid</a></h3> <div class="paragraph"> -<p>A Monoid is a Semigroup with an identity element (<code>mempty</code>). For the collection types the <code>mempty</code> -function is analogous to Clojure’s <code>empty</code>.</p> +<p>A Monoid is a Semigroup with an identity element (<code>mempty</code>). For the collection +types the <code>mempty</code> function is analogous to Clojure’s <code>empty</code>.</p> </div> <div class="paragraph"> <p>Given that the values it contains form a Semigroup, we can <code>mappend</code> multiple @@ -323,8 +319,8 @@ <h3 id="monoid"><a class="link" href="#monoid">Monoid</a></h3> <div class="sect2"> <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <div class="paragraph"> -<p>Let’s dive into the functor. The Functor represents some sort of "computational context", and the -abstraction consists of one unique function: <strong>fmap</strong>.</p> +<p>Let’s dive into the functor. The Functor represents some sort of "computational +context", and the abstraction consists of one unique function: <strong>fmap</strong>.</p> </div> <div class="listingblock"> <div class="title">Signature of <strong>fmap</strong> function</div> @@ -340,7 +336,8 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> </div> <div class="paragraph"> <p>But what is the <strong>functor context</strong>? It sounds more complex than it is. A Functor -wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> protocols.</p> +wrapper is any type that acts as "Box" and implements the <code>Context</code> and <code>Functor</code> +protocols.</p> </div> <div class="listingblock"> <div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> @@ -352,7 +349,8 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> </div> </div> <div class="paragraph"> -<p>The <code>just</code> function is a constructor of the Just type that is part of the Maybe monad.</p> +<p>The <code>just</code> function is a constructor of the Just type that is part of the +Maybe monad.</p> </div> <div class="paragraph"> <p>Let’s see one example of using <strong>fmap</strong> over a <strong>just</strong> instance:</p> @@ -367,24 +365,24 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> </div> </div> <div class="paragraph"> -<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the absence of a value. -It is a safe substitute for <code>nil</code> and may represent failure.</p> +<p>The <strong>Maybe</strong> type also has another constructor: <code>nothing</code>. It represents the +absence of a value. It is a safe substitute for <code>nil</code> and may represent failure.</p> </div> <div class="paragraph"> -<p>Let’s see what happens if we perform the same operation as the previous example over a <strong>nothing</strong> -instance:</p> +<p>Let’s see what happens if we perform the same operation as the previous example +over a <strong>nothing</strong> instance:</p> </div> <div class="listingblock"> <div class="title">Example using fmap over <strong>nothing</strong>.</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> -<p>Oh, awesome, instead of raising a <code>NullPointerException</code>, it just returns <strong>nothing</strong>. Another -advantage of using the functor abstraction, is that it always returns a result -of the same type as its second argument.</p> +<p>Oh, awesome, instead of raising a <code>NullPointerException</code>, it just returns +<strong>nothing</strong>. Another advantage of using the functor abstraction, is that it +always returns a result of the same type as its second argument.</p> </div> <div class="paragraph"> <p>Let’s see an example of applying fmap over a Clojure vector:</p> @@ -399,8 +397,8 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> </div> </div> <div class="paragraph"> -<p>The main difference compared to the previous example with Clojure’s map function, is that -map returns lazy seqs no matter what collection we pass to it:</p> +<p>The main difference compared to the previous example with Clojure’s map function, +is that map returns lazy seqs no matter what collection we pass to it:</p> </div> <div class="listingblock"> <div class="content"> @@ -409,8 +407,9 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> </div> </div> <div class="paragraph"> -<p>But why can we pass vectors to the <code>fmap</code> function? Because some Clojure container types like vectors, -lists and sets, also implement the functor abstraction. See the section on built-in types for more information.</p> +<p>But why can we pass vectors to the <code>fmap</code> function? Because some Clojure container +types like vectors, lists and sets, also implement the functor abstraction. See +the section on built-in types for more information.</p> </div> </div> <div class="sect2"> @@ -443,8 +442,8 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> </table> </div> <div class="paragraph"> -<p>The use case for Applicative Functors is roughly the same as for plain Functors: safe -evaluation of some computation in a context.</p> +<p>The use case for Applicative Functors is roughly the same as for plain Functors: +safe evaluation of some computation in a context.</p> </div> <div class="paragraph"> <p>Let’s see an example to better understand the differences between functor and @@ -495,7 +494,7 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> <span class="tok-c1">;; => #<Just "Hello Alex"></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"it"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> @@ -521,13 +520,13 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> <div class="sect2"> <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> <div class="paragraph"> -<p>The <strong>Foldable</strong> is a generic abstraction for data structures that can be folded. It consists -mainly on two functions: <code>foldl</code> and <code>foldr</code>. <code>foldl</code> is also known as <code>reduce</code> or <code>inject</code> -in other mainstream programming languages.</p> +<p>The <strong>Foldable</strong> is a generic abstraction for data structures that can be folded. It +consists mainly on two functions: <code>foldl</code> and <code>foldr</code>. <code>foldl</code> is also known as +<code>reduce</code> or <code>inject</code> in other mainstream programming languages.</p> </div> <div class="paragraph"> -<p>Both function have an identical signature and differ in how they traverse the data structure. -Let’s look at a little example using <code>foldl</code>:</p> +<p>Both function have an identical signature and differ in how they traverse the +data structure. Let’s look at a little example using <code>foldl</code>:</p> </div> <div class="listingblock"> <div class="content"> @@ -554,14 +553,14 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> </div> <div class="paragraph"> -<p>The main difference between <code>foldl</code> and <code>reduce</code> is that <code>foldl</code> has a fixed arity so all -parameters are mandatory and <code>foldl</code> is a generic abstraction that can work with other -types apart from collections.</p> +<p>The main difference between <code>foldl</code> and <code>reduce</code> is that <code>foldl</code> has a fixed +arity so all parameters are mandatory and <code>foldl</code> is a generic abstraction that +can work with other types apart from collections.</p> </div> <div class="paragraph"> -<p>As we said previously, the <code>foldl</code> and <code>foldr</code> differ mainly on how they traverse the -data structure. Then, for understanding better how they work internally, let’s see a -graphical representation of the <code>foldl</code> execution model:</p> +<p>As we said previously, the <code>foldl</code> and <code>foldr</code> differ mainly on how they traverse +the data structure. Then, for understanding better how they work internally, +let’s see a graphical representation of the <code>foldl</code> execution model:</p> </div> <div class="listingblock"> <div class="content"> @@ -578,9 +577,9 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="paragraph"> <p>In languages with strict argument evaluation, <code>foldr</code> does not have many -applications because when the data structure to fold grows it tends to consume all the -stack (causing the well known stack overflow). In case of Clojure, the unique obvious -case of using foldr is for small datastructures.</p> +applications because when the data structure to fold grows it tends to consume +all the stack (causing the well known stack overflow). In case of Clojure, +the unique obvious case of using foldr is for small datastructures.</p> </div> <div class="listingblock"> <div class="content"> @@ -589,8 +588,9 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> </div> <div class="paragraph"> -<p>The <strong>Foldable</strong> abstraction is already implemented for cloure vectors, lazy seqs and ranges -plus the cats maybe, either and validation types. Let see an example how it behaves with maybe:</p> +<p>The <strong>Foldable</strong> abstraction is already implemented for cloure vectors, lazy seqs +and ranges plus the cats maybe, either and validation types. Let see an example +how it behaves with maybe:</p> </div> <div class="listingblock"> <div class="content"> @@ -602,14 +602,14 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> </div> <div class="paragraph"> -<p>It there also other fold functions that are implemented in terms of the basic <code>foldl</code> -or <code>foldr</code> that can be <strong>foldm</strong> and <strong>foldmap</strong>. At this moment, cats comes only with -<strong>foldm</strong>.</p> +<p>It there also other fold functions that are implemented in terms of the basic +<code>foldl</code> or <code>foldr</code> that can be <strong>foldm</strong> and <strong>foldmap</strong>. At this moment, cats comes +only with <strong>foldm</strong>.</p> </div> <div class="paragraph"> -<p>The <strong>foldm</strong> function in analgous to the <code>foldl</code> in terms of how it does the fold operation, -with the difference that is aware of the monad context. Or in other terms, it works with -reducing function that return monad types.</p> +<p>The <strong>foldm</strong> function in analgous to the <code>foldl</code> in terms of how it does the +fold operation, with the difference that is aware of the monad context. Or in +other terms, it works with reducing function that return monad types.</p> </div> <div class="paragraph"> <p>Let see an example:</p> @@ -634,23 +634,24 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> <div class="sect2"> <h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> <div class="paragraph"> -<p>The <strong>Traversable</strong> is a generic abstraction for data structures that can be traversed from -left to right, running an Applicative action for each element. Traversables must also be -Functors and Foldables.</p> +<p>The <strong>Traversable</strong> is a generic abstraction for data structures that can be +traversed from left to right, running an Applicative action for each element. +Traversables must also be Functors and Foldables.</p> </div> <div class="paragraph"> -<p>Note that, since Traversables use the Applicative’s <code>pure</code> operation, the context of the -applicative must be set when using the <code>traverse</code> function.</p> +<p>Note that, since Traversables use the Applicative’s <code>pure</code> operation, the context +of the applicative must be set when using the <code>traverse</code> function.</p> </div> <div class="paragraph"> -<p>Let’s look at an example: we have a vector with numbers that we want to map to a Maybe value, -and we want to aggregate the result in a Maybe. If any of the actions fails (is Nothing) the -resulting aggregate will be Nothing, but if all succeed we preserve the vector’s structure -inside a Just value.</p> +<p>Let’s look at an example: we have a vector with numbers that we want to map to +a Maybe value, and we want to aggregate the result in a Maybe. If any of the +actions fails (is Nothing) the resulting aggregate will be Nothing, but if all +succeed we preserve the vector’s structure inside a Just value.</p> </div> <div class="paragraph"> -<p>First of all, we define the function that will transform a number to a Maybe. Our function will -wrap the value in a Just if it’s even and in a Nothing if it’s not:</p> +<p>First of all, we define the function that will transform a number to a Maybe. +Our function will wrap the value in a Just if it’s even and in a Nothing if it’s +not:</p> </div> <div class="listingblock"> <div class="content"> @@ -664,9 +665,9 @@ <h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> </div> </div> <div class="paragraph"> -<p>Now that we have a function that maps a value to the Maybe Applicative, we can traverse a vector -of numbers and aggregate a Maybe value. The applicatives will be evaluated from left to right using -the applicative’s <code>fapply</code>.</p> +<p>Now that we have a function that maps a value to the Maybe Applicative, we can +traverse a vector of numbers and aggregate a Maybe value. The applicatives will +be evaluated from left to right using the applicative’s <code>fapply</code>.</p> </div> <div class="listingblock"> <div class="content"> @@ -683,20 +684,22 @@ <h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> <span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe/context</span> <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">just-if-even</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => #<Nothing ></span> +<span class="tok-c1">;; => #<Nothing></span> <span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe/context</span> <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">just-if-even</span> <span class="tok-p">[</span><span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> -<p>Maybe is not that much of an interesting applicative, let’s see an example of using the Validation -applicative to validate a vector of values aggregating the results, be them success or failure.</p> +<p>Maybe is not that much of an interesting applicative, let’s see an example of +using the Validation applicative to validate a vector of values aggregating +the results, be them success or failure.</p> </div> <div class="paragraph"> -<p>First we will define a validation function that, given a number, will succed if it’s even. If it’s -odd, it will fail and record the failure in the map monoid from value to the error type (<code>:not-even</code>).</p> +<p>First we will define a validation function that, given a number, will succed if +it’s even. If it’s odd, it will fail and record the failure in the map monoid +from value to the error type (<code>:not-even</code>).</p> </div> <div class="listingblock"> <div class="content"> @@ -738,12 +741,12 @@ <h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> <div class="sect2"> <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="paragraph"> -<p>Monads are the most discussed programming concept to come from category theory. Like functors and -applicatives, monads deal with data in contexts.</p> +<p>Monads are the most discussed programming concept to come from category theory. +Like functors and applicatives, monads deal with data in contexts.</p> </div> <div class="paragraph"> -<p>Additionally, monads can also transform contexts by unwrapping data, applying functions to it and -putting new values in a completely different context.</p> +<p>Additionally, monads can also transform contexts by unwrapping data, applying +functions to it and putting new values in a completely different context.</p> </div> <div class="paragraph"> <p>The monad abstraction consists of two functions: <strong>bind</strong> and <strong>return</strong></p> @@ -755,8 +758,9 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> </div> </div> <div class="paragraph"> -<p>As you can see, bind works much like a Functor but with inverted arguments. The main difference is -that in a monad, the function is responsible for wrapping a returned value in a context.</p> +<p>As you can see, bind works much like a Functor but with inverted arguments. The +main difference is that in a monad, the function is responsible for wrapping a +returned value in a context.</p> </div> <div class="listingblock"> <div class="title">Example usage of the bind higher-order function.</div> @@ -767,10 +771,11 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> </div> </div> <div class="paragraph"> -<p>One of the key features of the bind function is that any computation executed within the context of -bind (monad) knows the context type implicitly. With this, if you apply some computation over some -monadic value and you want to return the result in the same container context but don’t know -what that container is, you can use <code>return</code> or <code>pure</code> functions:</p> +<p>One of the key features of the bind function is that any computation executed +within the context of bind (monad) knows the context type implicitly. With this, +if you apply some computation over some monadic value and you want to return +the result in the same container context but don’t know what that container is, +you can use <code>return</code> or <code>pure</code> functions:</p> </div> <div class="listingblock"> <div class="title">Usage of return function in bind context.</div> @@ -782,8 +787,9 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> </div> </div> <div class="paragraph"> -<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use the dynamic scope context -value that’s set internally by the <code>bind</code> function. Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> +<p>The <code>return</code> or <code>pure</code> functions, when called with one argument, try to use +the dynamic scope context value that’s set internally by the <code>bind</code> function. +Therefore, you can’t use them with one argument outside of a <code>bind</code> context.</p> </div> <div class="paragraph"> <p>We now can compose any number of computations using monad <strong>bind</strong> @@ -815,9 +821,10 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="sect2"> <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> <div class="paragraph"> -<p>Some monads also have the notion of an identity element analogous to that of Monoid. When calling <code>bind</code> on a identity element -for a monad, the same value is returned. This means that whenever we encounter the identity element in a monadic composition it will -short-circuit.</p> +<p>Some monads also have the notion of an identity element analogous to that of +Monoid. When calling <code>bind</code> on a identity element for a monad, the same value is +returned. This means that whenever we encounter the identity element in a monadic +composition it will short-circuit.</p> </div> <div class="paragraph"> <p>For the already familiar Maybe type the identity element is Nothing:</p> @@ -828,11 +835,12 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mzero</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> -<p>Having an identity element we can make a monadic composition short-circuit using a predicate:</p> +<p>Having an identity element we can make a monadic composition short-circuit using +a predicate:</p> </div> <div class="listingblock"> <div class="content"> @@ -846,12 +854,13 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> <span class="tok-p">(</span><span class="tok-nf">m/mzero</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">_</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> -<p>As you can see in the above example the predicate <code>(= a 2)</code> returns either a monadic value <code>(m/return nil)</code> or the identity value -for the maybe monad. This can be captured in a function, which is available in <code>cats.core</code> namespace:</p> +<p>As you can see in the above example the predicate <code>(= a 2)</code> returns either a +monadic value <code>(m/return nil)</code> or the identity value for the maybe monad. This +can be captured in a function, which is available in <code>cats.core</code> namespace:</p> </div> <div class="listingblock"> <div class="content"> @@ -875,7 +884,7 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">m/guard</span> <span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">_</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">))))))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> @@ -889,18 +898,20 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-ss">:when</span> <span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> </div> <div class="sect2"> <h3 id="monadplus"><a class="link" href="#monadplus">MonadPlus</a></h3> <div class="paragraph"> -<p>MonadPlus is a complementary abstraction for Monads that support an associative binary operation, analogous to that of a -Semigroup. If the monad implements the MonadZero and MonadPlus protocols it forms a monoid.</p> +<p>MonadPlus is a complementary abstraction for Monads that support an associative +binary operation, analogous to that of a Semigroup. If the monad implements the +MonadZero and MonadPlus protocols it forms a monoid.</p> </div> <div class="paragraph"> -<p>For the Maybe type, <code>mplus</code> acts similarly to a logical OR that treats <code>Nothing</code> values as falsey.</p> +<p>For the Maybe type, <code>mplus</code> acts similarly to a logical OR that treats <code>Nothing</code> +values as falsey.</p> </div> <div class="listingblock"> <div class="content"> @@ -908,7 +919,7 @@ <h3 id="monadplus"><a class="link" href="#monadplus">MonadPlus</a></h3> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mplus</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span> +<span class="tok-c1">;; => #<Nothing></span> <span class="tok-p">(</span><span class="tok-nf">m/mplus</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just 1></span> @@ -923,8 +934,9 @@ <h3 id="monad-transformers"><a class="link" href="#monad-transformers">Monad Tra <div class="sect3"> <h4 id="motivation"><a class="link" href="#motivation">Motivation</a></h4> <div class="paragraph"> -<p>We can combine two functors and get a new one automatically. Given any two functors <em>a</em> and <em>b</em>, -we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, we’ll call it fmap2:</p> +<p>We can combine two functors and get a new one automatically. Given any two +functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, +we’ll call it fmap2:</p> </div> <div class="listingblock"> <div class="content"> @@ -945,26 +957,26 @@ <h4 id="motivation"><a class="link" href="#motivation">Motivation</a></h4> </div> </div> <div class="paragraph"> -<p>However, monads don’t compose as nicely as functors do. We have to actually implement -the composition ourselves.</p> +<p>However, monads don’t compose as nicely as functors do. We have to actually +implement the composition ourselves.</p> </div> <div class="paragraph"> -<p>In some circumstances we would like combine the effects of two monads into another one. We call the -resulting monad a monad transformer, which is the composition of a "base" and "inner" monad. A -monad transformer is itself a monad.</p> +<p>In some circumstances we would like combine the effects of two monads into +another one. We call the resulting monad a monad transformer, which is the +composition of a "base" and "inner" monad. A monad transformer is itself a monad.</p> </div> </div> <div class="sect3"> <h4 id="using-monad-transformers"><a class="link" href="#using-monad-transformers">Using monad transformers</a></h4> <div class="paragraph"> -<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the transformer -using State as the base monad since we want the resulting type to be a stateful computation -that may fail: <code>s → Maybe (a, s)</code>.</p> +<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the +transformer using State as the base monad since we want the resulting type to +be a stateful computation that may fail: <code>s → Maybe (a, s)</code>.</p> </div> <div class="paragraph"> -<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining it with -any other monad. The transformer functions take a Monad as their argument and they -return a reified MonadTrans:</p> +<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining +it with any other monad. The transformer functions take a Monad as their +argument and they return a reified MonadTrans:</p> </div> <div class="listingblock"> <div class="content"> @@ -983,13 +995,14 @@ <h4 id="using-monad-transformers"><a class="link" href="#using-monad-transformer </div> </div> <div class="paragraph"> -<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates a stateful -function that yields a Maybe containing a pair (value, next state).</p> +<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates +a stateful function that yields a Maybe containing a pair (value, next state).</p> </div> <div class="paragraph"> -<p>You probably noticed that we had to wrap the state function invocation with <code>cats.context/with-context</code>. -When working with monad transformers, we have to be explicit about what monad we are using to implement -the binding policy since there is no way to distinguish values from a transformer type from those of +<p>You probably noticed that we had to wrap the state function invocation with +<code>cats.context/with-context</code>. When working with monad transformers, we have to +be explicit about what monad we are using to implement the binding policy since +there is no way to distinguish values from a transformer type from those of a regular monad.</p> </div> <div class="paragraph"> @@ -1005,14 +1018,15 @@ <h2 id="types"><a class="link" href="#types">Types</a></h2> <div class="sect2"> <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <div class="paragraph"> -<p>This is one of the two most used monad types (also known as Optional in other programming -languages).</p> +<p>This is one of the two most used monad types (also known as Optional in other +programming languages).</p> </div> <div class="paragraph"> -<p>The Maybe monad represents encapsulation of an optional value; e.g. it is used as the return type -of functions which may or may not return a meaningful value when they are applied. It consists -of either an empty constructor (called None or Nothing), or a constructor -encapsulating the original data type A (e.g. Just A or Some A).</p> +<p>The Maybe monad represents encapsulation of an optional value; e.g. it is used +as the return type of functions which may or may not return a meaningful value +when they are applied. It consists of either an empty constructor (called None +or Nothing), or a constructor encapsulating the original data type A (e.g. +Just A or Some A).</p> </div> <div class="paragraph"> <p><em>cats</em>, implements two types:</p> @@ -1034,21 +1048,23 @@ <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <span class="tok-c1">;; => #<Just 1></span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> -<p>There are other useful functions for working with maybe monad types in the same namespace. -See the API documentation for a full list of them. But here we will explain a little relevant subset -of them.</p> +<p>There are other useful functions for working with maybe monad types in the same +namespace. See the API documentation for a full list of them. But here we will +explain a little relevant subset of them.</p> </div> <div class="paragraph"> -<p>We mentioned above that <strong>fmap</strong> extracts the value from a functor context. You will also want to -extract values wrapped by <strong>just</strong> and you can do that with <strong>from-maybe</strong>.</p> +<p>We mentioned above that <strong>fmap</strong> extracts the value from a functor context. You +will also want to extract values wrapped by <strong>just</strong> and you can do that with +<strong>from-maybe</strong>.</p> </div> <div class="paragraph"> -<p>As we said previously, the Just or Nothing instances act like wrappers and in some circumstances -you will want extract the plain value from them. cats offers the <code>from-maybe</code> function for that.</p> +<p>As we said previously, the Just or Nothing instances act like wrappers and +in some circumstances you will want extract the plain value from them. cats offers +the <code>from-maybe</code> function for that.</p> </div> <div class="listingblock"> <div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> @@ -1064,13 +1080,13 @@ <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> </div> </div> <div class="paragraph"> -<p>The <code>from-maybe</code> function is a specialized version of a more generic one: <code>cats.core/extract</code>. -The generic version is a polymorphic function and will also work with different -types of different monads.</p> +<p>The <code>from-maybe</code> function is a specialized version of a more generic one: +<code>cats.core/extract</code>. The generic version is a polymorphic function and will +also work with different types of different monads.</p> </div> <div class="paragraph"> -<p>For interoperability with Clojure and ClojureScript’s <code>IDeref</code> abstraction, maybe values are -derrefable.</p> +<p>For interoperability with Clojure and ClojureScript’s <code>IDeref</code> abstraction, +maybe values are derrefable.</p> </div> <div class="listingblock"> <div class="title">Example using <strong>deref</strong> to extract values wrapped by <strong>just</strong>.</div> @@ -1086,8 +1102,8 @@ <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <div class="sect2"> <h3 id="either"><a class="link" href="#either">Either</a></h3> <div class="paragraph"> -<p>Either is another type that represents a result of a computation, but (in contrast with maybe) -it can return some data with a failed computation result.</p> +<p>Either is another type that represents a result of a computation, but (in +contrast with maybe) it can return some data with a failed computation result.</p> </div> <div class="paragraph"> <p>In <em>cats</em> it has two constructors:</p> @@ -1136,23 +1152,26 @@ <h3 id="exception"><a class="link" href="#exception">Exception</a></h3> <p>Also known as the Try monad, as popularized by Scala.</p> </div> <div class="paragraph"> -<p>It represents a computation that may either result in an exception or return a successfully computed -value. Is very similar to the Either monad, but is semantically different.</p> +<p>It represents a computation that may either result in an exception or return +a successfully computed value. Is very similar to the Either monad, but is +semantically different.</p> </div> <div class="paragraph"> <p>It consists of two types: Success and Failure. The Success type is a simple wrapper, like Right of the Either monad. But the Failure type is slightly different -from Left, because it always wraps an instance of Throwable (or any value in cljs since you can -throw arbitrary values in the JavaScript host).</p> +from Left, because it always wraps an instance of Throwable (or any value in +cljs since you can throw arbitrary values in the JavaScript host).</p> </div> <div class="paragraph"> -<p>The most common use case of this monad is to wrap third party libraries that use standard Exception -based error handling. Under normal circumstances, however, you should use Either instead.</p> +<p>The most common use case of this monad is to wrap third party libraries that +use standard Exception based error handling. Under normal circumstances, +however, you should use Either instead.</p> </div> <div class="paragraph"> -<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based error handling with -heap-based error handling. Instead of having an exception thrown and having to deal with it immediately -in the same thread, it disconnects the error handling and recovery.</p> +<p>It is an analogue of the try-catch block: it replaces try-catch’s stack-based +error handling with heap-based error handling. Instead of having an exception +thrown and having to deal with it immediately in the same thread, it disconnects +the error handling and recovery.</p> </div> <div class="listingblock"> <div class="title">Usage example of <strong>try-on</strong> macro.</div> @@ -1167,9 +1186,9 @@ <h3 id="exception"><a class="link" href="#exception">Exception</a></h3> </div> </div> <div class="paragraph"> -<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that returns a default value if a -computation fails, and <code>try-or-recover</code> that lets you handle the return value when executing a -function with the exception as first parameter.</p> +<p><em>cats</em> comes with other syntactic sugar macros: <code>try-or-else</code> that returns a +default value if a computation fails, and <code>try-or-recover</code> that lets you handle +the return value when executing a function with the exception as first parameter.</p> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-else</code> macro.</div> @@ -1190,9 +1209,9 @@ <h3 id="exception"><a class="link" href="#exception">Exception</a></h3> </div> </div> <div class="paragraph"> -<p>The types defined for the Exception monad (Success and Failure) also implement the Clojure IDeref -interface, which allows library development using monadic composition without forcing a user of -that library to use or understand monads.</p> +<p>The types defined for the Exception monad (Success and Failure) also implement +the Clojure IDeref interface, which allows library development using monadic +composition without forcing a user of that library to use or understand monads.</p> </div> <div class="paragraph"> <p>That is because when you dereference the failure instance, it will reraise the @@ -1228,9 +1247,10 @@ <h3 id="validation"><a class="link" href="#validation">Validation</a></h3> </div> </div> <div class="paragraph"> -<p>It implements the Applicative protocol, and its intended usage is as an Applicative. Applying Validation -values together errs on the side of the failure, and applying failures together aggregates their values -using the Semigroup’s <code>mappend</code> function.</p> +<p>It implements the Applicative protocol, and its intended usage is as an +Applicative. Applying Validation values together errs on the side of the failure, +and applying failures together aggregates their values using the Semigroup’s +<code>mappend</code> function.</p> </div> <div class="listingblock"> <div class="content"> @@ -1252,8 +1272,8 @@ <h3 id="validation"><a class="link" href="#validation">Validation</a></h3> <div class="sect2"> <h3 id="built-in-types"><a class="link" href="#built-in-types">Built in types</a></h3> <div class="paragraph"> -<p>Some of the abstractions in <em>cats</em> are implemented for built-in types but you can’t use them directly. First, -you must load the <code>cats.builtin</code> namespace:</p> +<p>Some of the abstractions in <em>cats</em> are implemented for built-in types but you +can’t use them directly. First, you must load the <code>cats.builtin</code> namespace:</p> </div> <div class="listingblock"> <div class="content"> @@ -1267,9 +1287,9 @@ <h3 id="built-in-types"><a class="link" href="#built-in-types">Built in types</a <div class="sect3"> <h4 id="nil"><a class="link" href="#nil">nil</a></h4> <div class="paragraph"> -<p>Given the fact that <code>nil</code> is both a value and a type, we have extended the <code>nil</code> type to be equivalent -to Maybe monad’s <code>Nothing</code>. This means that you can use <code>nil</code> as if were a <code>Just</code> instance like in the -following example:</p> +<p>Given the fact that <code>nil</code> is both a value and a type, we have extended the <code>nil</code> +type to be equivalent to Maybe monad’s <code>Nothing</code>. This means that you can use +<code>nil</code> as if were a <code>Just</code> instance like in the following example:</p> </div> <div class="listingblock"> <div class="content"> @@ -1290,8 +1310,8 @@ <h4 id="nil"><a class="link" href="#nil">nil</a></h4> <div class="sect3"> <h4 id="vector"><a class="link" href="#vector">Vector</a></h4> <div class="paragraph"> -<p>Clojure vectors also participate in several of the abstractions implemented in <em>cats</em>, most notably -as a monad. Compare the following <code>for</code> comprehension:</p> +<p>Clojure vectors also participate in several of the abstractions implemented +in <em>cats</em>, most notably as a monad. Compare the following <code>for</code> comprehension:</p> </div> <div class="listingblock"> <div class="content"> @@ -1316,18 +1336,22 @@ <h4 id="vector"><a class="link" href="#vector">Vector</a></h4> </div> </div> <div class="paragraph"> -<p>Note the symmetry between <code>for</code> and <code>mlet</code>. This is not accidental, both are what is called a monad comprehension, -the difference is that <code>for</code> is limited to sequences and <code>mlet</code> can work with arbitrary monads.</p> +<p>Note the symmetry between <code>for</code> and <code>mlet</code>. This is not accidental, both are +what is called a monad comprehension, the difference is that <code>for</code> is limited to +sequences and <code>mlet</code> can work with arbitrary monads.</p> </div> <div class="paragraph"> -<p>Also, since <code>mlet</code> desugars into calls to the Monad’s <code>bind</code> function, its result keeps the type of the monadic values.</p> +<p>Also, since <code>mlet</code> desugars into calls to the Monad’s <code>bind</code> function, its result +keeps the type of the monadic values.</p> </div> </div> <div class="sect3"> <h4 id="lazy-sequences"><a class="link" href="#lazy-sequences">Lazy sequences</a></h4> <div class="paragraph"> -<p>Lazy sequences implement the same abstractions as vectors with practically an identical implementation. If you don’t need -the results right away or are interested in a subset of the final results, you can use lazy sequence comprehensions.</p> +<p>Lazy sequences implement the same abstractions as vectors with practically an +identical implementation. If you don’t need the results right away or are +interested in a subset of the final results, you can use lazy sequence +comprehensions.</p> </div> <div class="paragraph"> <p>Using <code>mlet</code> with lazy sequences yields exactly the same result as using <code>for</code>:</p> @@ -1369,8 +1393,9 @@ <h4 id="set"><a class="link" href="#set">Set</a></h4> <div class="sect3"> <h4 id="map"><a class="link" href="#map">Map</a></h4> <div class="paragraph"> -<p>Maps implement the <em>Semigroup</em> protocol, since we can use <code>merge</code> as their associative binary operation. Using -<code>mappend</code> on maps is a way to merge them together:</p> +<p>Maps implement the <em>Semigroup</em> protocol, since we can use <code>merge</code> as their +associative binary operation. Using <code>mappend</code> on maps is a way to merge them +together:</p> </div> <div class="listingblock"> <div class="content"> @@ -1382,8 +1407,9 @@ <h4 id="map"><a class="link" href="#map">Map</a></h4> </div> </div> <div class="paragraph"> -<p>Since we can consider the empty map an identity element for the <code>mappend</code> associative binary operation maps also -implement <em>Monoid</em> and the <code>mempty</code> function gives an empty map.</p> +<p>Since we can consider the empty map an identity element for the <code>mappend</code> +associative binary operation maps also implement <em>Monoid</em> and the <code>mempty</code> +function gives an empty map.</p> </div> </div> </div> @@ -1395,8 +1421,9 @@ <h2 id="syntax-sugar"><a class="link" href="#syntax-sugar">Syntax sugar</a></h2> <div class="sect2"> <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> <div class="paragraph"> -<p>For convenience when using the monadic bind the <code>mlet</code> macro is implemented in cats. If you’ve followed along -with the documentation you’ve seen many examples of its usage already, let’s see what can <code>mlet</code> do.</p> +<p>For convenience when using the monadic bind the <code>mlet</code> macro is implemented in +cats. If you’ve followed along with the documentation you’ve seen many examples +of its usage already, let’s see what can <code>mlet</code> do.</p> </div> <div class="admonitionblock note"> <table> @@ -1436,9 +1463,10 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> <p>This makes a lot more natural to write code that uses monads.</p> </div> <div class="paragraph"> -<p>Since the bindings in the mlet macro run the monadic effects of the right-hand values we cannot just put -any value in there and expect to be bound to its left symbol. For cases where we want the regular behavior -of let we can inline a <code>:let</code> clause, just like with Clojure’s <code>for</code>:</p> +<p>Since the bindings in the mlet macro run the monadic effects of the right-hand +values we cannot just put any value in there and expect to be bound to its +left symbol. For cases where we want the regular behavior of let we can inline +a <code>:let</code> clause, just like with Clojure’s <code>for</code>:</p> </div> <div class="listingblock"> <div class="content"> @@ -1449,8 +1477,9 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> </div> </div> <div class="paragraph"> -<p><code>mlet</code> has support for using guards using a <code>:when</code> clause, analogous to the one used in <code>for</code>. We can filter out values -using <code>bind</code> with <code>mlet</code> and <code>:when</code> like the following:</p> +<p><code>mlet</code> has support for using guards using a <code>:when</code> clause, analogous to the +one used in <code>for</code>. We can filter out values using <code>bind</code> with <code>mlet</code> and +<code>:when</code> like the following:</p> </div> <div class="listingblock"> <div class="content"> @@ -1460,12 +1489,12 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-ss">:when</span> <span class="tok-p">(</span><span class="tok-nb">= </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => #<Nothing ></span></code></pre> +<span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> <div class="paragraph"> -<p>Any monadic type that implements <code>MonadZero</code> can be combined with guards inside <code>mlet</code> bindings. Here is an example with -vectors:</p> +<p>Any monadic type that implements <code>MonadZero</code> can be combined with guards +inside <code>mlet</code> bindings. Here is an example with vectors:</p> </div> <div class="listingblock"> <div class="content"> @@ -1499,11 +1528,11 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> </div> <div class="paragraph"> -<p>In the first call to <code>bind</code>, <code>(just 1)</code> and the anonymous function will be evaluated. -The call of the anonymous function performed by the first <code>bind</code> will cause the -evaluation of the <code>(just 41)</code> and the next anonymous function, which will be also -called to create the final result. Note that <code>(just 1)</code> and <code>(just 41)</code> are independent -and thus could be evaluated at the same time.</p> +<p>In the first call to <code>bind</code>, <code>(just 1)</code> and the anonymous function will be +evaluated. The call of the anonymous function performed by the first <code>bind</code> +will cause the evaluation of the <code>(just 41)</code> and the next anonymous function, +which will be also called to create the final result. Note that <code>(just 1)</code> +and <code>(just 41)</code> are independent and thus could be evaluated at the same time.</p> </div> <div class="paragraph"> <p>Here is the <code>mlet</code> version for reference and clarity:</p> @@ -1530,8 +1559,8 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> </div> <div class="paragraph"> -<p>Note that no <code>return</code> is used, this is because the <code>alet</code> body runs inside the applicative -context with <code>fapply</code>. This is roughly what <code>alet</code> desugars to:</p> +<p>Note that no <code>return</code> is used, this is because the <code>alet</code> body runs inside +the applicative context with <code>fapply</code>. This is roughly what <code>alet</code> desugars to:</p> </div> <div class="listingblock"> <div class="content"> @@ -1545,18 +1574,19 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> </div> <div class="paragraph"> -<p>Note that now <code>(just 1)</code> and <code>(just 41)</code> are evaluated at the same time. This use of -<code>fapply</code> can be called "applicative bind" and in some cases is more efficient than monadic -bind. Furthermore, the <code>alet</code> macro splits the bindings into batches that have -dependencies only in previous values and evaluates all applicative values in the batch at -the same time.</p> +<p>Note that now <code>(just 1)</code> and <code>(just 41)</code> are evaluated at the same time. This +use of <code>fapply</code> can be called "applicative bind" and in some cases is more +efficient than monadic bind. Furthermore, the <code>alet</code> macro splits the bindings +into batches that have dependencies only in previous values and evaluates all +applicative values in the batch at the same time.</p> </div> <div class="paragraph"> -<p>This makes no difference at all for Maybe, but applicatives that have latency in their -calculations (for example promises that do an async computation) get a pretty good evaluation -strategy, which can minimize overall latency. In the next examples we use the -<a href="https://github.com/funcool/promissum">promissum</a> Clojure library. Similar results can -be achieved in ClojureScript with the <a href="https://github.com/funcool/promesa">promesa</a> library.</p> +<p>This makes no difference at all for Maybe, but applicatives that have latency +in their calculations (for example promises that do an async computation) get +a pretty good evaluation strategy, which can minimize overall latency. In the +next examples we use the <a href="https://github.com/funcool/promissum">promissum</a> +Clojure library. Similar results can be achieved in ClojureScript with the +<a href="https://github.com/funcool/promesa">promesa</a> library.</p> </div> <div class="listingblock"> <div class="content"> @@ -1568,7 +1598,9 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> <span class="tok-p">(</span><span class="tok-nf">Thread/sleep</span> <span class="tok-nv">wait</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">deliver</span> <span class="tok-nv">wait</span><span class="tok-p">))))</span> -<span class="tok-c1">;; note: deref-ing for blocking the current thread waiting for the promise being delivered</span> +<span class="tok-c1">;; note: deref-ing for blocking the current thread</span> +<span class="tok-c1">;; waiting for the promise being delivered</span> + <span class="tok-p">(</span><span class="tok-nf">time</span> <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">41</span><span class="tok-p">)]</span> @@ -1617,9 +1649,12 @@ <h2 id="higher-order-functions"><a class="link" href="#higher-order-functions">H <div class="sect2"> <h3 id="curry"><a class="link" href="#curry">curry</a></h3> <div class="paragraph"> -<p>The first combinator that <em>cats</em> provides is a <code>curry</code> macro. Given a function, it can convert it to a curried -versions of itself. The generated function will accept parameters until all the expected parameters are given. -Let’s see some examples of a curried function in action:</p> +<p>The first combinator that <em>cats</em> provides is a <code>curry</code> macro. Given a function, +it can convert it to a curried versions of itself. The generated function will +accept parameters until all the expected parameters are given.</p> +</div> +<div class="paragraph"> +<p>Let’s see some examples of a curried function in action:</p> </div> <div class="listingblock"> <div class="content"> @@ -1644,12 +1679,13 @@ <h3 id="curry"><a class="link" href="#curry">curry</a></h3> </div> </div> <div class="paragraph"> -<p>As you can see above, since the original <code>add</code> has a single arity (3) and is fixed (i.e. it doesn’t accept a variable -number of arguments), the <code>curry</code> macro was able to generate a curried function with the correct number of parameters.</p> +<p>As you can see above, since the original <code>add</code> has a single arity (3) and is +fixed (i.e. it doesn’t accept a variable number of arguments), the <code>curry</code> macro +was able to generate a curried function with the correct number of parameters.</p> </div> <div class="paragraph"> -<p>This doesn’t mean that functions with multiple arities or variadic arguments can’t be curried but an arity for the -curried function must be given:</p> +<p>This doesn’t mean that functions with multiple arities or variadic arguments +can’t be curried but an arity for the curried function must be given:</p> </div> <div class="listingblock"> <div class="content"> @@ -1671,8 +1707,9 @@ <h3 id="curry"><a class="link" href="#curry">curry</a></h3> </div> </div> <div class="paragraph"> -<p>Curried functions are very useful in combination with the applicative’s <code>fapply</code> operation, since we can curry -a function and use applicatives for building up results with context-specific effects.</p> +<p>Curried functions are very useful in combination with the applicative’s +<code>fapply</code> operation, since we can curry a function and use applicatives for +building up results with context-specific effects.</p> </div> <div class="listingblock"> <div class="content"> @@ -1685,7 +1722,7 @@ <h3 id="curry"><a class="link" href="#curry">curry</a></h3> <span class="tok-c1">;; => #<Just 6></span> <span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-nv">curried+</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Nothing ></span> +<span class="tok-c1">;; => #<Nothing></span> <span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-nv">curried+</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">nil</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> <span class="tok-c1">;; => nil</span> @@ -1701,8 +1738,9 @@ <h3 id="curry"><a class="link" href="#curry">curry</a></h3> <div class="sect2"> <h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> <div class="paragraph"> -<p>The <code>lift-m</code> macro is a combinator for promoting functions that work on regular values to work on monadic values -instead. It uses the monad’s bind operation under the hood and, like <code>curry</code>, can be used without specifying arity +<p>The <code>lift-m</code> macro is a combinator for promoting functions that work on +regular values to work on monadic values instead. It uses the monad’s bind +operation under the hood and, like <code>curry</code>, can be used without specifying arity if the function we are lifting has a fixed and a single arity:</p> </div> <div class="listingblock"> @@ -1719,15 +1757,15 @@ <h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> <span class="tok-c1">;; => #<Just 6></span> <span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> -<span class="tok-c1">; => #<Nothing ></span> +<span class="tok-c1">; => #<Nothing></span> <span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">nil</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> <span class="tok-c1">;; => nil</span></code></pre> </div> </div> <div class="paragraph"> -<p>Like with <code>curry</code>, we must provide an arity in case we are lifting a function that has multiple arities or is -variadic:</p> +<p>Like with <code>curry</code>, we must provide an arity in case we are lifting a function +that has multiple arities or is variadic:</p> </div> <div class="listingblock"> <div class="content"> @@ -1740,15 +1778,16 @@ <h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> <span class="tok-c1">;; => #<Just 6></span> <span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> -<span class="tok-c1">; => #<Nothing ></span> +<span class="tok-c1">; => #<Nothing></span> <span class="tok-p">(</span><span class="tok-nf">add-m</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">nil</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">3</span><span class="tok-p">))</span> <span class="tok-c1">;; => nil</span></code></pre> </div> </div> <div class="paragraph"> -<p>Note that you can combine both <code>curry</code> and <code>lift-m</code> to get curried functions that work on monadic types using -the <code>curry-lift-m</code> macro. The arity is mandatory when using this macro:</p> +<p>Note that you can combine both <code>curry</code> and <code>lift-m</code> to get curried functions +that work on monadic types using the <code>curry-lift-m</code> macro. The arity is +mandatory when using this macro:</p> </div> <div class="listingblock"> <div class="content"> @@ -1774,12 +1813,14 @@ <h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> <h2 id="labs"><a class="link" href="#labs">Labs</a></h2> <div class="sectionbody"> <div class="paragraph"> -<p>This section intends to explain different kind of extra features that can be found under -<strong>cats.labs</strong> namespace. The fact that they are here because they are experimental, requires external -dependencies or simply does not have much application in clojure(script).</p> +<p>This section intends to explain different kind of extra features that can be +found under <strong>cats.labs</strong> namespace. The fact that they are here because they +are experimental, requires external dependencies or simply does not have much +application in clojure(script).</p> </div> <div class="paragraph"> -<p>In any case the state of each module will be notified on the start of the each section.</p> +<p>In any case the state of each module will be notified on the start of the +each section.</p> </div> <div class="sect2"> <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> @@ -1787,22 +1828,22 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> <p><strong>Status:</strong> Experimental</p> </div> <div class="paragraph"> -<p>This namespace exposes the ability to use the <strong>core.async</strong> channel as monadic type and in -consequence use it in <code>mlet</code> or <code>alet</code> macros.</p> +<p>This namespace exposes the ability to use the <strong>core.async</strong> channel as monadic +type and in consequence use it in <code>mlet</code> or <code>alet</code> macros.</p> </div> <div class="paragraph"> <p>Before use it, you should add core.async to your dependencies:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.1.346.0-17112a-alpha"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.2.371"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> -<p>Now, let see some code. This will allow you understand how it can be used and why this -integration between cats and core.async matters. At first step we will go to define a -function that emulates whatever asynchronous task, that for our case it’s consist in a -just sleep operation:</p> +<p>Now, let see some code. This will allow you understand how it can be used and +why this integration between cats and core.async matters. At first step we will +go to define a function that emulates whatever asynchronous task, that for +our case it’s consist in a just sleep operation:</p> </div> <div class="listingblock"> <div class="content"> @@ -1819,8 +1860,8 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> </div> <div class="paragraph"> -<p>Now, instead of using the <code>go</code> macro, just use a <code>let</code> like bindings with the help of the -<strong>mlet</strong> macro for bind values to asyncrhonous calls:</p> +<p>Now, instead of using the <code>go</code> macro, just use a <code>let</code> like bindings with the +help of the <strong>mlet</strong> macro for bind values to asyncrhonous calls:</p> </div> <div class="listingblock"> <div class="content"> @@ -1856,14 +1897,14 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </ul> </div> <div class="paragraph"> -<p>The main difference with the default clojure <code>let</code>, is that the bindings are already plain -values (not channels). The take! operation is already performed automatically by the -<code>mlet</code>. This kind of behavior will make you fully asynchronous code looks like -synchronous code.</p> +<p>The main difference with the default clojure <code>let</code>, is that the bindings +are already plain values (not channels). The take! operation is already +performed automatically by the <code>mlet</code>. This kind of behavior will make you +fully asynchronous code looks like synchronous code.</p> </div> <div class="paragraph"> -<p>But, cats also comes with <code>alet</code> that has identical aspect to the previously used <code>mlet</code> -macro, but it has some advantages over it. Let see an example:</p> +<p>But, cats also comes with <code>alet</code> that has identical aspect to the previously +used <code>mlet</code> macro, but it has some advantages over it. Let see an example:</p> </div> <div class="listingblock"> <div class="content"> @@ -1898,8 +1939,9 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </ul> </div> <div class="paragraph"> -<p>The alet is a powerfull macro that analyzes the dependencies between bindings and executes -the expressions in batches resultin in a very atractive feature for asynchronous calls.</p> +<p>The alet is a powerfull macro that analyzes the dependencies between bindings +and executes the expressions in batches resultin in a very atractive feature +for asynchronous calls.</p> </div> <div class="paragraph"> <p>Here an other examples that shows in a clearly way how the batches are executed:</p> @@ -1934,22 +1976,22 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De <p><strong>Status:</strong> Experimental</p> </div> <div class="paragraph"> -<p>This namespace exposes the ability to use the <strong>manifold</strong> deferred as monadic type and in -consequence use it in <code>mlet</code> or <code>alet</code> macros.</p> +<p>This namespace exposes the ability to use the <strong>manifold</strong> deferred as monadic +type and in consequence use it in <code>mlet</code> or <code>alet</code> macros.</p> </div> <div class="paragraph"> <p>Before use it, you should add manifold to your dependencies:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">manifold</span> <span class="tok-s">"0.1.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">manifold</span> <span class="tok-s">"0.1.1"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> -<p>Now, let see some code. This will allow you understand how it can be used and why this -integration between cats and manifold matters. At first step we will go to define a -function that emulates whatever asynchronous task, that for our case it’s consist in a -just sleep operation:</p> +<p>Now, let see some code. This will allow you understand how it can be used +and why this integration between cats and manifold matters. At first step we +will go to define a function that emulates whatever asynchronous task, that for +our case it’s consist in a just sleep operation:</p> </div> <div class="paragraph"> <p>For demostration purposes, let’s define a function that emulates the asyncrhonous @@ -1990,9 +2032,9 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De </div> </div> <div class="paragraph"> -<p>If you are familiar with manifold’s <code>let-flow</code> macro, the cats <code>alet</code> serves for almost -identical purpose, with difference that <code>alet</code> is defined as generic abstraction -instread of a specific purpose macro.</p> +<p>If you are familiar with manifold’s <code>let-flow</code> macro, the cats <code>alet</code> serves +for almost identical purpose, with difference that <code>alet</code> is defined as +generic abstraction instread of a specific purpose macro.</p> </div> <div class="listingblock"> <div class="title">Example using manifold deferred with <code>alet</code>.</div> @@ -2040,7 +2082,8 @@ <h3 id="state"><a class="link" href="#state">State</a></h3> </div> <div class="paragraph"> <p>You just saw an example of the low-level primitive state monad. For basic usage -you do not need to write your own functions, just use some helpers that <em>cats</em> provides.</p> +you do not need to write your own functions, just use some helpers that <em>cats</em> +provides.</p> </div> <div class="paragraph"> <p>Let’s look at one example before explaining the details:</p> @@ -2058,9 +2101,9 @@ <h3 id="state"><a class="link" href="#state">State</a></h3> </div> </div> <div class="paragraph"> -<p>At the moment of evaluation in the previous expression, nothing of what we have defined -is executed. But instead of returning the unadorned final value of the computation, -a strange/unknown object of type <strong>State</strong> is returned.</p> +<p>At the moment of evaluation in the previous expression, nothing of what we +have defined is executed. But instead of returning the unadorned final value +of the computation, a strange/unknown object of type <strong>State</strong> is returned.</p> </div> <div class="paragraph"> <p>The State type is simply a wrapper for Clojure functions, nothing more.</p> @@ -2099,8 +2142,9 @@ <h3 id="state"><a class="link" href="#state">State</a></h3> </div> </div> <div class="paragraph"> -<p>The <code>run-state</code> function returns an instance of the Pair type. The Pair type acts like any other seq in -Clojure with the exception that it can only contain two values.</p> +<p>The <code>run-state</code> function returns an instance of the Pair type. The Pair type +acts like any other seq in Clojure with the exception that it can only contain +two values.</p> </div> </div> <div class="sect2"> @@ -2109,13 +2153,16 @@ <h3 id="reader"><a class="link" href="#reader">Reader</a></h3> <p><strong>Status:</strong> Experimental</p> </div> <div class="paragraph"> -<p>The reader monad is another commonly used monad in Haskell. It’s used for gluing together computations that -depend on a read-only environment. As with the state monad, we don’t have to thread the environment manualy -since the monadic bind does it for us. The type of the reader monad are one-argument functions.</p> +<p>The reader monad is another commonly used monad in Haskell. It’s used for +gluing together computations that depend on a read-only environment. As with +the state monad, we don’t have to thread the environment manualy since the +monadic bind does it for us. The type of the reader monad are one-argument +functions.</p> </div> <div class="paragraph"> -<p>The Reader type is analogous to State, simply a wrapper for regular Clojure functions. If we want our functions -to participate in the reader abstraction we have to wrap them in a Reader instance.</p> +<p>The Reader type is analogous to State, simply a wrapper for regular Clojure +functions. If we want our functions to participate in the reader abstraction +we have to wrap them in a Reader instance.</p> </div> <div class="listingblock"> <div class="title">Valid function for the reader monad</div> @@ -2131,8 +2178,9 @@ <h3 id="reader"><a class="link" href="#reader">Reader</a></h3> </div> </div> <div class="paragraph"> -<p>cats provides a few reader functions already. <code>ask</code> is the simplest reader, simply returns the environment. We -can execute readers using the <code>run-reader</code> function which accepts a reader and an environment.</p> +<p>cats provides a few reader functions already. <code>ask</code> is the simplest reader, +simply returns the environment. We can execute readers using the <code>run-reader</code> +function which accepts a reader and an environment.</p> </div> <div class="listingblock"> <div class="title">Example of running the ask reader</div> @@ -2173,8 +2221,9 @@ <h3 id="reader"><a class="link" href="#reader">Reader</a></h3> </div> </div> <div class="paragraph"> -<p>We can also alter the reader’s environment in a context using the <code>local</code> function which given a function and -a reader returns a new reader whose environment is the result of applying the first function given to <code>local</code> to +<p>We can also alter the reader’s environment in a context using the <code>local</code> +function which given a function and a reader returns a new reader whose +environment is the result of applying the first function given to <code>local</code> to the original environment. Let’s see it in action to understand it better:</p> </div> <div class="listingblock"> @@ -2190,8 +2239,9 @@ <h3 id="reader"><a class="link" href="#reader">Reader</a></h3> </div> </div> <div class="paragraph"> -<p>Note that since we executed <code>ask</code> with the function <code>#(*2 %)</code> altering its original environment (20), the resulting -<code>env</code> value is two times the original environment.</p> +<p>Note that since we executed <code>ask</code> with the function <code>#(*2 %)</code> altering its +original environment (20), the resulting <code>env</code> value is two times the original +environment.</p> </div> </div> <div class="sect2"> @@ -2212,6 +2262,347 @@ <h3 id="continuation"><a class="link" href="#continuation">Continuation</a></h3> <p>TODO</p> </div> </div> +<div class="sect2"> +<h3 id="lens"><a class="link" href="#lens">Lens</a></h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>This namespace implements functional references to one (lens) or multiple +(traversal) values modeled as functions. Lenses and traversals generalize the +get, put and mapping to a particular part of a data structure.</p> +</div> +<div class="sect3"> +<h4 id="lenses"><a class="link" href="#lenses">Lenses</a></h4> +<div class="paragraph"> +<p>We’ll start by using the most basic lens, the identity lens. We can get the value +a lens is focused on using the <code>focus</code> function in <code>cats.labs.lens</code> ns:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.lens</span> <span class="tok-ss">:as</span> <span class="tok-nv">l</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">l/id</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [0 1 2 3]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>We have two other primitives available: the <code>put</code> operation and <code>over</code>, which lets +us apply a function over the focused value of a lens:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/id</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 42</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/id</span> <span class="tok-nb">count </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 4</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>We can focus on the first (<code>fst</code>), (<code>second</code>), or nth (<code>nth</code>) element of a list +with a lens:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-c1">;; fst</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">l/fst</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/fst</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 2 3]</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/fst</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [42 2 3]</span> + +<span class="tok-c1">;; nth</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 3</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [1 2 4]</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [1 2 42]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>And compose them arbitrarily using function composition:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-c1">;; fst</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/fst</span> <span class="tok-nv">l/fst</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">))</span> + <span class="tok-p">[[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]]</span> + <span class="tok-p">[</span><span class="tok-mi">6</span> <span class="tok-mi">7</span> <span class="tok-mi">8</span><span class="tok-p">]])</span> +<span class="tok-c1">;; => 2</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/fst</span> <span class="tok-nv">l/fst</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">))</span> + <span class="tok-mi">42</span> + <span class="tok-p">[[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]]</span> + <span class="tok-p">[</span><span class="tok-mi">6</span> <span class="tok-mi">7</span> <span class="tok-mi">8</span><span class="tok-p">]])</span> +<span class="tok-c1">;; => [[[0 1 42] [3 4 5]] [6 7 8]]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Lenses compose with regular function composition and, like transducers, the +combined lens runs from left to right.</p> +</div> +<div class="paragraph"> +<p>The <code>passes</code> function accepts a predicate and returns a lens that focuses +in an element only if it passes the predicate.</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 2</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 3</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => nil</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 1</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>There’s <code>key</code> and <code>select-keys</code> for focusing on one or multiple keys respectively:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/key</span> <span class="tok-ss">:a</span><span class="tok-p">)</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/key</span> <span class="tok-ss">:a</span><span class="tok-p">)</span> <span class="tok-nb">str </span><span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> +<span class="tok-c1">;; => {:a "1", :b 2}</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/key</span> <span class="tok-ss">:a</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> +<span class="tok-c1">;; => {:a 42, :b 2}</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:a</span><span class="tok-p">])</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> +<span class="tok-c1">;; => {:a 1}</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:c</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nb">zipmap </span><span class="tok-p">(</span><span class="tok-nb">keys </span><span class="tok-nv">m</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nb">repeat </span><span class="tok-mi">42</span><span class="tok-p">)))</span> + <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> +<span class="tok-c1">;; => {:b 2, :a 42}</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:c</span><span class="tok-p">])</span> + <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">0</span><span class="tok-p">}</span> + <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span> <span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">})</span> +<span class="tok-c1">;; => {:b 2, :a 0}</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p><code>in</code> for focusing on a path:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> + <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> +<span class="tok-c1">;; => {:c 42}</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> + <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">m</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nb">zipmap </span><span class="tok-p">(</span><span class="tok-nb">vals </span><span class="tok-nv">m</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nb">keys </span><span class="tok-nv">m</span><span class="tok-p">)))</span> + <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> +<span class="tok-c1">;; => {:a {:b {42 :c}}}</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> + <span class="tok-mi">42</span> + <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> +<span class="tok-c1">;; => {:a {:b 42}}</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Let’s take a look at a combinator that will let us build a unit-conversion lens +called <code>units</code>. We have to supply a function to convert from unit <code>a</code> to unit <code>b</code> +and viceversa:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">sec->min</span> <span class="tok-p">[</span><span class="tok-nv">sec</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">/ </span><span class="tok-nv">sec</span> <span class="tok-mi">60</span><span class="tok-p">))</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">min->sec</span> <span class="tok-p">[</span><span class="tok-nv">min</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">* min </span><span class="tok-mi">60</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">mins</span> <span class="tok-p">(</span><span class="tok-nf">l/units</span> <span class="tok-nv">sec->min</span> + <span class="tok-nv">min->sec</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">mins</span> <span class="tok-mi">120</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 2</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">mins</span> <span class="tok-mi">3</span> <span class="tok-mi">120</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 180</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">mins</span> <span class="tok-nb">inc </span><span class="tok-mi">60</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 120</span></code></pre> +</div> +</div> +</div> +<div class="sect3"> +<h4 id="traversals"><a class="link" href="#traversals">Traversals</a></h4> +<div class="paragraph"> +<p>A traversal is similar to a lens but it focuses on multiple values instead of one. +Therefore, we use the <code>foci</code> function for viewing the focused elements of a +traversal.</p> +</div> +<div class="paragraph"> +<p>Traversals should be composed with other traversals. You can compose lenses +with a traversal but it will become a traversal and you will have to use <code>foci</code> +for viewing its values.</p> +</div> +<div class="paragraph"> +<p>Let’s look at the identity traversal, it’s called <code>it</code>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/it</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => (42)</span> + +<span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/it</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => ([0 1 2 3])</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/it</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 42</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/it</span> <span class="tok-nb">count </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => 4</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>each</code> traversal focuses every value in a collection, allowing us to map +preservering structure. The <code>cat</code> traversal flattens a nested collection:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/each</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => (0 1 2 3)</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/each</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [1 2 3 4]</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/each</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [42 42 42 42]</span> + +<span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/cat</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> +<span class="tok-c1">;; => (0 1 2 3 4 5)</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/cat</span> <span class="tok-nb">inc </span><span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> +<span class="tok-c1">;; => [[1 2 3] [4 5 6]]</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/cat</span> <span class="tok-mi">42</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> +<span class="tok-c1">;; => [[42 42 42] [42 42 42]]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The <code>filter</code> traversal can be used to filter can be used to filter the results +of another by composition:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/each</span> <span class="tok-p">(</span><span class="tok-nf">l/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> + <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => (1 3 5)</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/each</span> <span class="tok-p">(</span><span class="tok-nf">l/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> + <span class="tok-nv">inc</span> + <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 2 4 4 6]</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/each</span> <span class="tok-p">(</span><span class="tok-nf">l/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> + <span class="tok-mi">42</span> + <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [42 2 42 4 42]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Using <code>only</code> is equivalent to composing <code>each</code> and <code>filter</code>:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-p">(</span><span class="tok-nf">l/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> + <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => (1 3 5)</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> + <span class="tok-nv">inc</span> + <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [2 2 4 4 6]</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> + <span class="tok-mi">42</span> + <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [42 2 42 4 42]</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Another interesting traversals include <code>keys</code> for focusing on map keys, <code>vals</code> +for focusing on map values, and <code>indexed</code> for focusing on index-value pairs.</p> +</div> +</div> +<div class="sect3"> +<h4 id="interoperability"><a class="link" href="#interoperability">Interoperability</a></h4> +<div class="paragraph"> +<p><code>cats.labs.lens</code> implement the <code>Focus</code> and <code>Foci</code> atom types, which are derived +atoms with either a lens or a traversal. We can focus on a subpart of the +structure and change it, reflecting the changes on the original atom:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.lens</span> <span class="tok-ss">:as</span> <span class="tok-nv">l</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">atom</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">fa</span> <span class="tok-p">(</span><span class="tok-nf">l/focus-atom</span> <span class="tok-nv">l/fst</span> <span class="tok-nv">a</span><span class="tok-p">))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">fsa</span> <span class="tok-p">(</span><span class="tok-nf">l/foci-atom</span> <span class="tok-nv">l/each</span> <span class="tok-nv">a</span><span class="tok-p">))</span> + +<span class="tok-o">@</span><span class="tok-nv">fa</span> +<span class="tok-c1">;; =>1</span> + +<span class="tok-o">@</span><span class="tok-nv">fsa</span> +<span class="tok-c1">;; => (1 2 3 4)</span> + +<span class="tok-p">(</span><span class="tok-nf">reset!</span> <span class="tok-nv">fa</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span> + +<span class="tok-o">@</span><span class="tok-nv">fa</span> +<span class="tok-c1">;; => 42</span> + +<span class="tok-o">@</span><span class="tok-nv">fsa</span> +<span class="tok-c1">;; => (42 2 3 4)</span> + +<span class="tok-o">@</span><span class="tok-nv">a</span> +<span class="tok-c1">;; => [42 2 3 4]</span> + +<span class="tok-p">(</span><span class="tok-nf">reset!</span> <span class="tok-nv">fsa</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-c1">;; => (42 42 42 42)</span> + +<span class="tok-o">@</span><span class="tok-nv">a</span> +<span class="tok-c1">;; => [42 42 42 42]</span> + +<span class="tok-o">@</span><span class="tok-nv">fa</span> +<span class="tok-c1">;; => 42</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p><code>swap!</code> and watches also work on the derived focus or foci atoms.</p> +</div> +</div> +</div> </div> </div> <div class="sect1"> @@ -2231,7 +2622,7 @@ <h2 id="complementary-libraries"><a class="link" href="#complementary-libraries" <p>Promise monad (Clojure): <a href="https://github.com/funcool/promissum" class="bare">https://github.com/funcool/promissum</a></p> </li> <li> -<p>Concurrent data fetching: <a href="https://github.com/kachayev/muse" class="bare">https://github.com/kachayev/muse</a></p> +<p>Concurrent data fetching: <a href="https://github.com/funcool/muse" class="bare">https://github.com/funcool/muse</a></p> </li> </ul> </div> @@ -2243,9 +2634,10 @@ <h2 id="faq"><a class="link" href="#faq">FAQ</a></h2> <div class="sect2"> <h3 id="what-clojure-types-implement-some-of-the-category-theory-abstractions"><a class="link" href="#what-clojure-types-implement-some-of-the-category-theory-abstractions">What Clojure types implement some of the Category Theory abstractions?</a></h3> <div class="paragraph"> -<p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to extend Clojure types -that don’t act like containers. For example, Clojure keywords are values but can not be containers so -they should not extend any of the previously explained protocols.</p> +<p>In contrast to other similar libraries in Clojure, <em>cats</em> doesn’t intend to +extend Clojure types that don’t act like containers. For example, Clojure +keywords are values but can not be containers so they should not extend any of +the previously explained protocols.</p> </div> <table class="tableblock frame-all grid-all spread"> <caption class="title">Table 1. Summary of Clojure types and implemented protocols</caption> @@ -2320,9 +2712,26 @@ <h3 id="contributing"><a class="link" href="#contributing">Contributing</a></h3> </div> </div> <div class="sect2"> +<h3 id="editor-integration"><a class="link" href="#editor-integration">Editor integration</a></h3> +<div class="paragraph"> +<p>For making Emacs' clojure-mode treat <code>alet</code>, <code>mlet</code> et al like a <code>let</code> and indent +them correctly, you can use <code>define-clojure-indent</code> like in the following example:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="elisp"><span class="tok-p">(</span><span class="tok-nb">require</span> <span class="tok-ss">'clojure-mode</span><span class="tok-p">)</span> + +<span class="tok-p">(</span><span class="tok-nv">define-clojure-indent</span> + <span class="tok-p">(</span><span class="tok-nv">alet</span> <span class="tok-ss">'defun</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nv">mlet</span> <span class="tok-ss">'defun</span><span class="tok-p">))</span></code></pre> +</div> +</div> +</div> +<div class="sect2"> <h3 id="source-code"><a class="link" href="#source-code">Source Code</a></h3> <div class="paragraph"> -<p><em>cats</em> is open source and can be found on <a href="https://github.com/funcool/cats">github</a>.</p> +<p><em>cats</em> is open source and can be found on +<a href="https://github.com/funcool/cats">github</a>.</p> </div> <div class="paragraph"> <p>You can clone the public repository with this command:</p> @@ -2336,13 +2745,22 @@ <h3 id="source-code"><a class="link" href="#source-code">Source Code</a></h3> <div class="sect2"> <h3 id="run-tests"><a class="link" href="#run-tests">Run tests</a></h3> <div class="paragraph"> -<p>For running tests just execute this:</p> +<p>For running tests just execute this for clojure:</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="text">lein test</code></pre> </div> </div> +<div class="paragraph"> +<p>And this for clojurescript:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="text">./scripts/build +node ./out/tests.js</code></pre> +</div> +</div> </div> <div class="sect2"> <h3 id="license"><a class="link" href="#license">License</a></h3> @@ -2378,31 +2796,10 @@ <h3 id="license"><a class="link" href="#license">License</a></h3> </div> </div> </div> -<div class="sect1"> -<h2 id="editor-integration"><a class="link" href="#editor-integration">Editor integration</a></h2> -<div class="sectionbody"> -<div class="sect2"> -<h3 id="emacs"><a class="link" href="#emacs">Emacs</a></h3> -<div class="paragraph"> -<p>For making Emacs' clojure-mode treat <code>alet</code>, <code>mlet</code> et al like a <code>let</code> and indent -them correctly, you can use <code>define-clojure-indent</code> like in the following example:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="elisp"><span class="tok-p">(</span><span class="tok-nb">require</span> <span class="tok-ss">'clojure-mode</span><span class="tok-p">)</span> - -<span class="tok-p">(</span><span class="tok-nv">define-clojure-indent</span> - <span class="tok-p">(</span><span class="tok-nv">alet</span> <span class="tok-ss">'defun</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nv">mlet</span> <span class="tok-ss">'defun</span><span class="tok-p">))</span></code></pre> -</div> -</div> -</div> -</div> -</div> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-10-04 09:24:04 EEST +Last updated 2015-11-26 19:12:26 EET </div> </div> </body> From 5d7edb9cceed77598f2897be4737a5656f97c11c Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Wed, 16 Dec 2015 00:56:09 +0200 Subject: [PATCH 48/52] Generate documentation --- latest/api/cats.applicative.validation.html | 2 +- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 40 +++++++++++----- latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 +- latest/api/cats.labs.continuation.html | 2 +- latest/api/cats.labs.crdt.gcounter.html | 2 +- latest/api/cats.labs.crdt.gset.html | 2 +- latest/api/cats.labs.crdt.html | 2 +- latest/api/cats.labs.crdt.pncounter.html | 2 +- latest/api/cats.labs.crdt.protocols.html | 2 +- latest/api/cats.labs.crdt.util.html | 2 +- latest/api/cats.labs.lens.html | 2 +- latest/api/cats.labs.manifold.html | 2 +- latest/api/cats.labs.reader.html | 2 +- latest/api/cats.labs.state.html | 2 +- latest/api/cats.labs.sugar.html | 2 +- latest/api/cats.labs.test.html | 2 + latest/api/cats.labs.writer.html | 2 +- latest/api/cats.monad.either.html | 4 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 2 +- latest/api/cats.protocols.html | 2 +- latest/api/cats.util.html | 2 +- latest/api/index.html | 2 +- latest/index.html | 52 +++++++++++++++++++-- 28 files changed, 106 insertions(+), 40 deletions(-) create mode 100644 latest/api/cats.labs.test.html diff --git a/latest/api/cats.applicative.validation.html b/latest/api/cats.applicative.validation.html index 1a4e7ea..faed908 100644 --- a/latest/api/cats.applicative.validation.html +++ b/latest/api/cats.applicative.validation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L213">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L110">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L105">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L206">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L129">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.applicative.validation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3 current"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.applicative.validation</h2><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch v fail-f ok-f)</code></div><div class="doc"><div class="markdown"><p>Given a validation value and two functions, if the validation is a failure apply the first function to the value it contains; if the validation is a success apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L206">view source</a></div></div><div class="public anchor" id="var-branch-fail"><h3><a href="#var-branch-fail">branch-fail</a></h3><div class="usage"><code>(branch-fail v fail-f)</code></div><div class="doc"><div class="markdown"><p>Given a validation value and a function, if the validation is a failure, apply the function to the value it contains; if the validation is a success, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L218">view source</a></div></div><div class="public anchor" id="var-branch-ok"><h3><a href="#var-branch-ok">branch-ok</a></h3><div class="usage"><code>(branch-ok v ok-f)</code></div><div class="doc"><div class="markdown"><p>Given a validation value and a function, if the validation is a success, apply the function to the value it contains; if the validation is a failure, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L226">view source</a></div></div><div class="public anchor" id="var-either-.3Evalidation"><h3><a href="#var-either-.3Evalidation">either->validation</a></h3><div class="usage"><code>(either->validation ae)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L245">view source</a></div></div><div class="public anchor" id="var-fail"><h3><a href="#var-fail">fail</a></h3><div class="usage"><code>(fail)</code><code>(fail v)</code></div><div class="doc"><div class="markdown"><p>A Fail type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L110">view source</a></div></div><div class="public anchor" id="var-fail.3F"><h3><a href="#var-fail.3F">fail?</a></h3><div class="usage"><code>(fail? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Fail type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L123">view source</a></div></div><div class="public anchor" id="var-ok"><h3><a href="#var-ok">ok</a></h3><div class="usage"><code>(ok v)</code></div><div class="doc"><div class="markdown"><p>An Ok type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L105">view source</a></div></div><div class="public anchor" id="var-ok.3F"><h3><a href="#var-ok.3F">ok?</a></h3><div class="usage"><code>(ok? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Ok type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L117">view source</a></div></div><div class="public anchor" id="var-validation"><h3><a href="#var-validation">validation</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L216">view source</a></div></div><div class="public anchor" id="var-validation-.3Eeither"><h3><a href="#var-validation-.3Eeither">validation->either</a></h3><div class="usage"><code>(validation->either av)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L238">view source</a></div></div><div class="public anchor" id="var-validation.3F"><h3><a href="#var-validation.3F">validation?</a></h3><div class="usage"><code>(validation? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of the Validation applicative.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/applicative/validation.cljc#L129">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index ef01965..424815e 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L423">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L404">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L355">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L234">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L461">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L128">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L299">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L480">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L442">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L159">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L408">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L389">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L234">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L446">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L128">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L284">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L465">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L427">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L159">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index 2adab38..3f57256 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index a5c3b16..3fd9574 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,8 +1,14 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L641">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L645">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L684">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L699">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L670">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L676">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L662">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L729">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L733">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L772">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L787">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L758">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L764">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L750">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L649">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L357">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L737">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L410">view source</a></div></div><div class="public anchor" id="var-bimap"><h3><a href="#var-bimap">bimap</a></h3><div class="usage"><code>(bimap f g)</code><code>(bimap f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p><p>Given functions <code>f</code> and <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to a first argument or <code>g</code> to a second argument.</p> +<pre><code>(bimap dec inc (either/right 1) +;; => #<Right 2> + +(bimap dec inc (either/left 1) +;; => #<Left 0> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L133">view source</a></div></div><div class="public anchor" id="var-bind"><h3><a href="#var-bind">bind</a></h3><div class="usage"><code>(bind mv f)</code></div><div class="doc"><div class="markdown"><p>Given a monadic value <code>mv</code> and a function <code>f</code>, apply <code>f</code> to the unwrapped value of <code>mv</code>.</p> <pre><code>(bind (either/right 1) (fn [v] (return (inc v)))) ;; => #<Right [2]> @@ -23,7 +29,7 @@ ((((c+) 1) 2) 3) ;; => 6 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L456">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L439">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L532">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L693">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L133">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L509">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L492">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L620">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L781">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L186">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -32,7 +38,7 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L617">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L708">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L705">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L796">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> <pre><code>(require '[cats.context :as ctx] '[cats.core :as m] '[cats.monad.maybe :as maybe]) @@ -56,7 +62,7 @@ (ctx/with-context maybe/context (foldm m-div 1 [])) ;; => #<Just 1> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L715">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L701">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L803">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L789">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> </code></pre><p>Yet an other example that fails:</p> @@ -66,7 +72,13 @@ (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L597">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L166">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L497">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L685">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left-map"><h3><a href="#var-left-map">left-map</a></h3><div class="usage"><code>(left-map f)</code><code>(left-map f bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the first argument.</p><p>Given a function <code>f</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to the first argument, if present, otherwise leave <code>bv</code> unchanged.</p> +<pre><code>(left-map dec (either/right 1) +;; => #<Right 1> + +(left-map dec (either/left 1) +;; => #<Left 0> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L152">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L219">view source</a></div></div><div class="public anchor" id="var-lift-a"><h3><a href="#var-lift-a">lift-a</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-a f)</code><code>(lift-a n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to an applicative context.</p><p>(def app+ (lift-a 2 +))</p><p>(app+ (maybe/just 1) (maybe/just 2)) ;; => <Just 3></p><p>(app+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(app+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L585">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L550">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> <pre><code>(require '[cats.context :as ctx] '[cats.monad.maybe :as maybe] '[cats.core :as m]) @@ -84,7 +96,7 @@ (ctx/with-context maybe/context (mapseq #(maybe/just (* % 2)) [])) ;; => #<Just [()]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L571">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L659">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) @@ -96,14 +108,20 @@ b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L177">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L230">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> <pre><code>(with-context either/context (pure 1)) ;; => #<Right [1]> (pure either/context 1) ;; => #<Right [1]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L54">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L75">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a collection of monadic values, collect their values in a seq returned in the monadic context.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L54">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L75">view source</a></div></div><div class="public anchor" id="var-right-map"><h3><a href="#var-right-map">right-map</a></h3><div class="usage"><code>(right-map g)</code><code>(right-map g bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the second argument.</p><p>Given a function <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>g</code> to the second argument, if present, otherwise leave <code>bv</code> unchanged.</p> +<pre><code>(right-map inc (either/right 1) +;; => #<Right 2> + +(right-map inc (either/left 1) +;; => #<Left 1> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L169">view source</a></div></div><div class="public anchor" id="var-sequence"><h3><a href="#var-sequence">sequence</a></h3><div class="usage"><code>(sequence mvs)</code></div><div class="doc"><div class="markdown"><p>Given a collection of monadic values, collect their values in a seq returned in the monadic context.</p> <pre><code>(require '[cats.context :as ctx] '[cats.monad.maybe :as maybe] '[cats.core :as m]) @@ -117,7 +135,7 @@ (ctx/with-context maybe/context (m/sequence [])) ;; => #<Just [()]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L541">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L629">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> <pre><code>(defn inc-if-even [n] (if (even? n) @@ -127,4 +145,4 @@ (ctx/with-context maybe/context (m/traverse inc-if-even [2 4])) ;; => #<Just [3 4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L757">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L157">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L146">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L845">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L210">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L199">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index c6d5e14..ad57575 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L122">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L126">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html index 1a8eb7c..fb3649f 100644 --- a/latest/api/cats.labs.channel.html +++ b/latest/api/cats.labs.channel.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.continuation.html b/latest/api/cats.labs.continuation.html index 76d8f08..ae14037 100644 --- a/latest/api/cats.labs.continuation.html +++ b/latest/api/cats.labs.continuation.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L92">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L61">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L52">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L85">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.continuation documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.continuation</h2><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="public anchor" id="var-call-cc"><h3><a href="#var-call-cc">call-cc</a></h3><div class="usage"><code>(call-cc f)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L92">view source</a></div></div><div class="public anchor" id="var-context"><h3><a href="#var-context">context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L61">view source</a></div></div><div class="public anchor" id="var-continuation"><h3><a href="#var-continuation">continuation</a></h3><div class="usage"><code>(continuation mfn)</code></div><div class="doc"><div class="markdown"><p>Default constructor for continuation.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L52">view source</a></div></div><div class="public anchor" id="var-run-cont"><h3><a href="#var-run-cont">run-cont</a></h3><div class="usage"><code>(run-cont cont)</code></div><div class="doc"><div class="markdown"><p>Given a Continuation instance, execute the wrapped computation and return its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/continuation.cljc#L85">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.gcounter.html b/latest/api/cats.labs.crdt.gcounter.html index cca3d8d..a1d28e7 100644 --- a/latest/api/cats.labs.crdt.gcounter.html +++ b/latest/api/cats.labs.crdt.gcounter.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.gcounter documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.gcounter</h2><div class="doc"><div class="markdown"><p>A G-Counter is a grow-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current actor.</p><p>Divergent histories are resolved by taking the maximum count for each actor (like a vector clock merge). The value of the counter is the sum of all actor counts.</p></div></div><div class="public anchor" id="var--.3EGCounter"><h3><a href="#var--.3EGCounter">->GCounter</a></h3><div class="usage"><code>(->GCounter e node)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.gcounter.GCounter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L13">view source</a></div></div><div class="public anchor" id="var-gcounter"><h3><a href="#var-gcounter">gcounter</a></h3><div class="usage"><code>(gcounter)</code><code>(gcounter node)</code></div><div class="doc"><div class="markdown"><p>A G-Counter data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L62">view source</a></div></div><div class="public anchor" id="var-gcounter*"><h3><a href="#var-gcounter*">gcounter*</a></h3><div class="usage"><code>(gcounter* data node)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L57">view source</a></div></div><div class="public anchor" id="var-gcounter.3F"><h3><a href="#var-gcounter.3F">gcounter?</a></h3><div class="usage"><code>(gcounter? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is a instance of GCounter type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L51">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.gcounter documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.gcounter</h2><div class="doc"><div class="markdown"><p>A G-Counter is a grow-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current actor.</p><p>Divergent histories are resolved by taking the maximum count for each actor (like a vector clock merge). The value of the counter is the sum of all actor counts.</p></div></div><div class="public anchor" id="var--.3EGCounter"><h3><a href="#var--.3EGCounter">->GCounter</a></h3><div class="usage"><code>(->GCounter e node)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.gcounter.GCounter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L13">view source</a></div></div><div class="public anchor" id="var-gcounter"><h3><a href="#var-gcounter">gcounter</a></h3><div class="usage"><code>(gcounter)</code><code>(gcounter node)</code></div><div class="doc"><div class="markdown"><p>A G-Counter data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L62">view source</a></div></div><div class="public anchor" id="var-gcounter*"><h3><a href="#var-gcounter*">gcounter*</a></h3><div class="usage"><code>(gcounter* data node)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L57">view source</a></div></div><div class="public anchor" id="var-gcounter.3F"><h3><a href="#var-gcounter.3F">gcounter?</a></h3><div class="usage"><code>(gcounter? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is a instance of GCounter type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gcounter.cljc#L51">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.gset.html b/latest/api/cats.labs.crdt.gset.html index 7fddf7b..cef5fe0 100644 --- a/latest/api/cats.labs.crdt.gset.html +++ b/latest/api/cats.labs.crdt.gset.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.gset documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.gset</h2><div class="doc"><div class="markdown"><p>Set union is commutative and convergent; hence it is always safe to have simultaneous writes to a set which only allows addition. You cannot remove an element of a G-Set.</p></div></div><div class="public anchor" id="var--.3EGSet"><h3><a href="#var--.3EGSet">->GSet</a></h3><div class="usage"><code>(->GSet s)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.gset.GSet.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L55">view source</a></div></div><div class="public anchor" id="var-gset"><h3><a href="#var-gset">gset</a></h3><div class="usage"><code>(gset)</code><code>(gset data)</code></div><div class="doc"><div class="markdown"><p>A g-set data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L132">view source</a></div></div><div class="public anchor" id="var-gset*"><h3><a href="#var-gset*">gset*</a></h3><div class="usage"><code>(gset* data)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L124">view source</a></div></div><div class="public anchor" id="var-gset.3F"><h3><a href="#var-gset.3F">gset?</a></h3><div class="usage"><code>(gset? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L120">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.gset documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.gset</h2><div class="doc"><div class="markdown"><p>Set union is commutative and convergent; hence it is always safe to have simultaneous writes to a set which only allows addition. You cannot remove an element of a G-Set.</p></div></div><div class="public anchor" id="var--.3EGSet"><h3><a href="#var--.3EGSet">->GSet</a></h3><div class="usage"><code>(->GSet s)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.gset.GSet.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L55">view source</a></div></div><div class="public anchor" id="var-gset"><h3><a href="#var-gset">gset</a></h3><div class="usage"><code>(gset)</code><code>(gset data)</code></div><div class="doc"><div class="markdown"><p>A g-set data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L132">view source</a></div></div><div class="public anchor" id="var-gset*"><h3><a href="#var-gset*">gset*</a></h3><div class="usage"><code>(gset* data)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L124">view source</a></div></div><div class="public anchor" id="var-gset.3F"><h3><a href="#var-gset.3F">gset?</a></h3><div class="usage"><code>(gset? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/gset.cljc#L120">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.html b/latest/api/cats.labs.crdt.html index 48e2426..8063021 100644 --- a/latest/api/cats.labs.crdt.html +++ b/latest/api/cats.labs.crdt.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 current"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--decode"><h3><a href="#var--decode">-decode</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L66">view source</a></div></div><div class="public anchor" id="var--encode"><h3><a href="#var--encode">-encode</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L65">view source</a></div></div><div class="public anchor" id="var--load"><h3><a href="#var--load">-load</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L64">view source</a></div></div><div class="public anchor" id="var-dec"><h3><a href="#var-dec">dec</a></h3><div class="usage"><code>(dec owner)</code></div><div class="doc"><div class="markdown"><p>A shortcut for <code>(inc-by counter -1)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L25">view source</a></div></div><div class="public anchor" id="var-decode"><h3><a href="#var-decode">decode</a></h3><div class="usage"><code>(decode data)</code><code>(decode data format)</code></div><div class="doc"><div class="markdown"><p>Deserialize crdt data type.</p><p>Only edn format is supported out of the box. This apo is extensible.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L101">view source</a></div></div><div class="public anchor" id="var-encode"><h3><a href="#var-encode">encode</a></h3><div class="usage"><code>(encode data)</code><code>(encode data format)</code></div><div class="doc"><div class="markdown"><p>Serialize crdt data type.</p><p>Only edn format is supported out of the box. This api is extensible.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L91">view source</a></div></div><div class="public anchor" id="var-inc"><h3><a href="#var-inc">inc</a></h3><div class="usage"><code>(inc owner)</code></div><div class="doc"><div class="markdown"><p>Increment the counter value in 1.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L15">view source</a></div></div><div class="public anchor" id="var-inc-by"><h3><a href="#var-inc-by">inc-by</a></h3><div class="usage"><code>(inc-by owner v)</code></div><div class="doc"><div class="markdown"><p>Increment the counter value in <code>v</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L20">view source</a></div></div><div class="public anchor" id="var-ISerializable"><h3><a href="#var-ISerializable">ISerializable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--dump"><h3><a href="#var--dump">-dump</a></h3><div class="usage"><code>(-dump _)</code></div><div class="doc"><div class="markdown"><p>Get plain representation of the data type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L45">view source</a></div></div><div class="public anchor" id="var-merge"><h3><a href="#var-merge">merge</a></h3><div class="usage"><code>(merge owner other)</code></div><div class="doc"><div class="markdown"><p>Converge two data structures. Both provided data types should satify the JoinSemiLattice protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L34">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3 current"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--decode"><h3><a href="#var--decode">-decode</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L66">view source</a></div></div><div class="public anchor" id="var--encode"><h3><a href="#var--encode">-encode</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L65">view source</a></div></div><div class="public anchor" id="var--load"><h3><a href="#var--load">-load</a></h3><h4 class="type">multimethod</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L64">view source</a></div></div><div class="public anchor" id="var-dec"><h3><a href="#var-dec">dec</a></h3><div class="usage"><code>(dec owner)</code></div><div class="doc"><div class="markdown"><p>A shortcut for <code>(inc-by counter -1)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L25">view source</a></div></div><div class="public anchor" id="var-decode"><h3><a href="#var-decode">decode</a></h3><div class="usage"><code>(decode data)</code><code>(decode data format)</code></div><div class="doc"><div class="markdown"><p>Deserialize crdt data type.</p><p>Only edn format is supported out of the box. This apo is extensible.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L101">view source</a></div></div><div class="public anchor" id="var-encode"><h3><a href="#var-encode">encode</a></h3><div class="usage"><code>(encode data)</code><code>(encode data format)</code></div><div class="doc"><div class="markdown"><p>Serialize crdt data type.</p><p>Only edn format is supported out of the box. This api is extensible.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L91">view source</a></div></div><div class="public anchor" id="var-inc"><h3><a href="#var-inc">inc</a></h3><div class="usage"><code>(inc owner)</code></div><div class="doc"><div class="markdown"><p>Increment the counter value in 1.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L15">view source</a></div></div><div class="public anchor" id="var-inc-by"><h3><a href="#var-inc-by">inc-by</a></h3><div class="usage"><code>(inc-by owner v)</code></div><div class="doc"><div class="markdown"><p>Increment the counter value in <code>v</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L20">view source</a></div></div><div class="public anchor" id="var-ISerializable"><h3><a href="#var-ISerializable">ISerializable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--dump"><h3><a href="#var--dump">-dump</a></h3><div class="usage"><code>(-dump _)</code></div><div class="doc"><div class="markdown"><p>Get plain representation of the data type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L45">view source</a></div></div><div class="public anchor" id="var-merge"><h3><a href="#var-merge">merge</a></h3><div class="usage"><code>(merge owner other)</code></div><div class="doc"><div class="markdown"><p>Converge two data structures. Both provided data types should satify the JoinSemiLattice protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt.cljc#L34">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.pncounter.html b/latest/api/cats.labs.crdt.pncounter.html index fe7f52c..b44ebd9 100644 --- a/latest/api/cats.labs.crdt.pncounter.html +++ b/latest/api/cats.labs.crdt.pncounter.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.pncounter documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.pncounter</h2><div class="doc"><div class="markdown"><p>PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as internal G-Counters.</p><p>Merge is handled by merging the internal P and N counters. The value of the counter is the value of the P counter minus the value of the N counter.</p></div></div><div class="public anchor" id="var--.3EPNCounter"><h3><a href="#var--.3EPNCounter">->PNCounter</a></h3><div class="usage"><code>(->PNCounter p n)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.pncounter.PNCounter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L18">view source</a></div></div><div class="public anchor" id="var-pncounter"><h3><a href="#var-pncounter">pncounter</a></h3><div class="usage"><code>(pncounter)</code><code>(pncounter node)</code></div><div class="doc"><div class="markdown"><p>A G-Counter data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L64">view source</a></div></div><div class="public anchor" id="var-pncounter*"><h3><a href="#var-pncounter*">pncounter*</a></h3><div class="usage"><code>(pncounter* data node)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L55">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.pncounter documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.pncounter</h2><div class="doc"><div class="markdown"><p>PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as internal G-Counters.</p><p>Merge is handled by merging the internal P and N counters. The value of the counter is the value of the P counter minus the value of the N counter.</p></div></div><div class="public anchor" id="var--.3EPNCounter"><h3><a href="#var--.3EPNCounter">->PNCounter</a></h3><div class="usage"><code>(->PNCounter p n)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.crdt.pncounter.PNCounter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L18">view source</a></div></div><div class="public anchor" id="var-pncounter"><h3><a href="#var-pncounter">pncounter</a></h3><div class="usage"><code>(pncounter)</code><code>(pncounter node)</code></div><div class="doc"><div class="markdown"><p>A G-Counter data type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L64">view source</a></div></div><div class="public anchor" id="var-pncounter*"><h3><a href="#var-pncounter*">pncounter*</a></h3><div class="usage"><code>(pncounter* data node)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/pncounter.cljc#L55">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.protocols.html b/latest/api/cats.labs.crdt.protocols.html index ed9d733..29de7de 100644 --- a/latest/api/cats.labs.crdt.protocols.html +++ b/latest/api/cats.labs.crdt.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.protocols</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-*node*"><h3><a href="#var-*node*">*node*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/protocols.cljc#L4">view source</a></div></div><div class="public anchor" id="var-ICounter"><h3><a href="#var-ICounter">ICounter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A basic protocol for counters.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--add"><h3><a href="#var--add">-add</a></h3><div class="usage"><code>(-add _ delta)</code></div><div class="doc"><div class="markdown"><p>Add operation in a counter.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/protocols.cljc#L6">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch current"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.protocols</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-*node*"><h3><a href="#var-*node*">*node*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/protocols.cljc#L4">view source</a></div></div><div class="public anchor" id="var-ICounter"><h3><a href="#var-ICounter">ICounter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A basic protocol for counters.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--add"><h3><a href="#var--add">-add</a></h3><div class="usage"><code>(-add _ delta)</code></div><div class="doc"><div class="markdown"><p>Add operation in a counter.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/protocols.cljc#L6">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.crdt.util.html b/latest/api/cats.labs.crdt.util.html index dd021b1..272f446 100644 --- a/latest/api/cats.labs.crdt.util.html +++ b/latest/api/cats.labs.crdt.util.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4 current"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.util</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-hostname"><h3><a href="#var-hostname">hostname</a></h3><div class="usage"><code>(hostname)</code></div><div class="doc"><div class="markdown"><p>Determines the hostname in the most portable manner.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/util.cljc#L4">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.crdt.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4 current"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.crdt.util</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-hostname"><h3><a href="#var-hostname">hostname</a></h3><div class="usage"><code>(hostname)</code></div><div class="doc"><div class="markdown"><p>Determines the hostname in the most portable manner.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/crdt/util.cljc#L4">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.lens.html b/latest/api/cats.labs.lens.html index 68fde3c..44eea79 100644 --- a/latest/api/cats.labs.lens.html +++ b/latest/api/cats.labs.lens.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.lens documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.lens</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EFoci"><h3><a href="#var--.3EFoci">->Foci</a></h3><div class="usage"><code>(->Foci trav a)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.lens.Foci.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L337">view source</a></div></div><div class="public anchor" id="var--.3EFocus"><h3><a href="#var--.3EFocus">->Focus</a></h3><div class="usage"><code>(->Focus lens a)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.lens.Focus.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L265">view source</a></div></div><div class="public anchor" id="var-both"><h3><a href="#var-both">both</a></h3><div class="usage"><code>(both one other)</code></div><div class="doc"><div class="markdown"><p>Given two traversals, compose them in parallel. The getter of the resulting traversal will combine results from both traversals and the setter will update the state with both setters.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L93">view source</a></div></div><div class="public anchor" id="var-cat"><h3><a href="#var-cat">cat</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L216">view source</a></div></div><div class="public anchor" id="var-const-setter"><h3><a href="#var-const-setter">const-setter</a></h3><div class="usage"><code>(const-setter s _)</code></div><div class="doc"><div class="markdown"><p>The constant setter, returns the state unaltered.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L40">view source</a></div></div><div class="public anchor" id="var-each"><h3><a href="#var-each">each</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A traversal into each element of a sequence.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L209">view source</a></div></div><div class="public anchor" id="var-ffoci"><h3><a href="#var-ffoci">ffoci</a></h3><div class="usage"><code>(ffoci traversal s)</code></div><div class="doc"><div class="markdown"><p>Given a traversal and a state, return the first value focused by the traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L73">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a traversal that focuses the elements that pass the predicate.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L219">view source</a></div></div><div class="public anchor" id="var-foci"><h3><a href="#var-foci">foci</a></h3><div class="usage"><code>(foci traversal s)</code></div><div class="doc"><div class="markdown"><p>Given a traversal and a state, return the values focused by the traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L67">view source</a></div></div><div class="public anchor" id="var-foci-atom"><h3><a href="#var-foci-atom">foci-atom</a></h3><div class="usage"><code>(foci-atom traversal a)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L413">view source</a></div></div><div class="public anchor" id="var-focus"><h3><a href="#var-focus">focus</a></h3><div class="usage"><code>(focus lens s)</code></div><div class="doc"><div class="markdown"><p>Given a lens and a state, return the value focused by the lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L61">view source</a></div></div><div class="public anchor" id="var-focus-atom"><h3><a href="#var-focus-atom">focus-atom</a></h3><div class="usage"><code>(focus-atom lens a)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L409">view source</a></div></div><div class="public anchor" id="var-fst"><h3><a href="#var-fst">fst</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L144">view source</a></div></div><div class="public anchor" id="var-id"><h3><a href="#var-id">id</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L45">view source</a></div></div><div class="public anchor" id="var-id-setter"><h3><a href="#var-id-setter">id-setter</a></h3><div class="usage"><code>(id-setter s f)</code></div><div class="doc"><div class="markdown"><p>The identity setter, applies the function to the state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L35">view source</a></div></div><div class="public anchor" id="var-in"><h3><a href="#var-in">in</a></h3><div class="usage"><code>(in path)</code><code>(in path default)</code></div><div class="doc"><div class="markdown"><p>Given a path and optionally a default value, return a lens that focuses the given path in an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L186">view source</a></div></div><div class="public anchor" id="var-indexed"><h3><a href="#var-indexed">indexed</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L256">view source</a></div></div><div class="public anchor" id="var-it"><h3><a href="#var-it">it</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L49">view source</a></div></div><div class="public anchor" id="var-key"><h3><a href="#var-key">key</a></h3><div class="usage"><code>(key k)</code></div><div class="doc"><div class="markdown"><p>Given a key, returns a lens that focuses on the given key of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L163">view source</a></div></div><div class="public anchor" id="var-keys"><h3><a href="#var-keys">keys</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Focus on the keys of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L238">view source</a></div></div><div class="public anchor" id="var-lens"><h3><a href="#var-lens">lens</a></h3><div class="usage"><code>(lens getter setter)</code></div><div class="doc"><div class="markdown"><p>Given a function for getting the focused value from a state (getter) and a function that takes the state and and update function (setter), constructs a lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L9">view source</a></div></div><div class="public anchor" id="var-lens-.3Etraversal"><h3><a href="#var-lens-.3Etraversal">lens->traversal</a></h3><div class="usage"><code>(lens->traversal l)</code></div><div class="doc"><div class="markdown"><p>Derive a traversal from a lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L200">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity traversal under <code>both</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L53">view source</a></div></div><div class="public anchor" id="var-nth"><h3><a href="#var-nth">nth</a></h3><div class="usage"><code>(nth n)</code></div><div class="doc"><div class="markdown"><p>Given a number, returns a lens that focuses on the given index of a collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L134">view source</a></div></div><div class="public anchor" id="var-only"><h3><a href="#var-only">only</a></h3><div class="usage"><code>(only applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a traversal that filters a coll.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L233">view source</a></div></div><div class="public anchor" id="var-over"><h3><a href="#var-over">over</a></h3><div class="usage"><code>(over st f s)</code></div><div class="doc"><div class="markdown"><p>Given a setter, a function and a state, apply the function over the value focused by the setter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L78">view source</a></div></div><div class="public anchor" id="var-passes"><h3><a href="#var-passes">passes</a></h3><div class="usage"><code>(passes applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a lens that focuses in an element only if passes the predicate.</p><p>The lens is not well-behaved, depens on the outcome of the predicate.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L119">view source</a></div></div><div class="public anchor" id="var-put"><h3><a href="#var-put">put</a></h3><div class="usage"><code>(put st v s)</code></div><div class="doc"><div class="markdown"><p>Given a setter, a new value and a state, replace the value focused by the lens with the new one.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L85">view source</a></div></div><div class="public anchor" id="var-select-keys"><h3><a href="#var-select-keys">select-keys</a></h3><div class="usage"><code>(select-keys ks)</code></div><div class="doc"><div class="markdown"><p>Return a lens focused on the given keys in an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L173">view source</a></div></div><div class="public anchor" id="var-snd"><h3><a href="#var-snd">snd</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L145">view source</a></div></div><div class="public anchor" id="var-tail"><h3><a href="#var-tail">tail</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A lens into the tail of a collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L154">view source</a></div></div><div class="public anchor" id="var-traversal"><h3><a href="#var-traversal">traversal</a></h3><div class="usage"><code>(traversal getter setter)</code></div><div class="doc"><div class="markdown"><p>Given a function for getting the focused values from a state (getter) and a function that takes the state and and update function (setter), constructs a traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L21">view source</a></div></div><div class="public anchor" id="var-units"><h3><a href="#var-units">units</a></h3><div class="usage"><code>(units one->other other->one)</code></div><div class="doc"><div class="markdown"><p>Given a function from unit A to unit B and another in the opposite direction, construct a lens that focuses and updates a converted value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L107">view source</a></div></div><div class="public anchor" id="var-vals"><h3><a href="#var-vals">vals</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Focus on the values of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L247">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.lens documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.lens</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EFoci"><h3><a href="#var--.3EFoci">->Foci</a></h3><div class="usage"><code>(->Foci trav a)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.lens.Foci.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L337">view source</a></div></div><div class="public anchor" id="var--.3EFocus"><h3><a href="#var--.3EFocus">->Focus</a></h3><div class="usage"><code>(->Focus lens a)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.lens.Focus.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L265">view source</a></div></div><div class="public anchor" id="var-both"><h3><a href="#var-both">both</a></h3><div class="usage"><code>(both one other)</code></div><div class="doc"><div class="markdown"><p>Given two traversals, compose them in parallel. The getter of the resulting traversal will combine results from both traversals and the setter will update the state with both setters.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L93">view source</a></div></div><div class="public anchor" id="var-cat"><h3><a href="#var-cat">cat</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L216">view source</a></div></div><div class="public anchor" id="var-const-setter"><h3><a href="#var-const-setter">const-setter</a></h3><div class="usage"><code>(const-setter s _)</code></div><div class="doc"><div class="markdown"><p>The constant setter, returns the state unaltered.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L40">view source</a></div></div><div class="public anchor" id="var-each"><h3><a href="#var-each">each</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A traversal into each element of a sequence.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L209">view source</a></div></div><div class="public anchor" id="var-ffoci"><h3><a href="#var-ffoci">ffoci</a></h3><div class="usage"><code>(ffoci traversal s)</code></div><div class="doc"><div class="markdown"><p>Given a traversal and a state, return the first value focused by the traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L73">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a traversal that focuses the elements that pass the predicate.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L219">view source</a></div></div><div class="public anchor" id="var-foci"><h3><a href="#var-foci">foci</a></h3><div class="usage"><code>(foci traversal s)</code></div><div class="doc"><div class="markdown"><p>Given a traversal and a state, return the values focused by the traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L67">view source</a></div></div><div class="public anchor" id="var-foci-atom"><h3><a href="#var-foci-atom">foci-atom</a></h3><div class="usage"><code>(foci-atom traversal a)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L413">view source</a></div></div><div class="public anchor" id="var-focus"><h3><a href="#var-focus">focus</a></h3><div class="usage"><code>(focus lens s)</code></div><div class="doc"><div class="markdown"><p>Given a lens and a state, return the value focused by the lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L61">view source</a></div></div><div class="public anchor" id="var-focus-atom"><h3><a href="#var-focus-atom">focus-atom</a></h3><div class="usage"><code>(focus-atom lens a)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L409">view source</a></div></div><div class="public anchor" id="var-fst"><h3><a href="#var-fst">fst</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L144">view source</a></div></div><div class="public anchor" id="var-id"><h3><a href="#var-id">id</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L45">view source</a></div></div><div class="public anchor" id="var-id-setter"><h3><a href="#var-id-setter">id-setter</a></h3><div class="usage"><code>(id-setter s f)</code></div><div class="doc"><div class="markdown"><p>The identity setter, applies the function to the state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L35">view source</a></div></div><div class="public anchor" id="var-in"><h3><a href="#var-in">in</a></h3><div class="usage"><code>(in path)</code><code>(in path default)</code></div><div class="doc"><div class="markdown"><p>Given a path and optionally a default value, return a lens that focuses the given path in an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L186">view source</a></div></div><div class="public anchor" id="var-indexed"><h3><a href="#var-indexed">indexed</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L256">view source</a></div></div><div class="public anchor" id="var-it"><h3><a href="#var-it">it</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L49">view source</a></div></div><div class="public anchor" id="var-key"><h3><a href="#var-key">key</a></h3><div class="usage"><code>(key k)</code></div><div class="doc"><div class="markdown"><p>Given a key, returns a lens that focuses on the given key of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L163">view source</a></div></div><div class="public anchor" id="var-keys"><h3><a href="#var-keys">keys</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Focus on the keys of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L238">view source</a></div></div><div class="public anchor" id="var-lens"><h3><a href="#var-lens">lens</a></h3><div class="usage"><code>(lens getter setter)</code></div><div class="doc"><div class="markdown"><p>Given a function for getting the focused value from a state (getter) and a function that takes the state and and update function (setter), constructs a lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L9">view source</a></div></div><div class="public anchor" id="var-lens-.3Etraversal"><h3><a href="#var-lens-.3Etraversal">lens->traversal</a></h3><div class="usage"><code>(lens->traversal l)</code></div><div class="doc"><div class="markdown"><p>Derive a traversal from a lens.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L200">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Identity traversal under <code>both</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L53">view source</a></div></div><div class="public anchor" id="var-nth"><h3><a href="#var-nth">nth</a></h3><div class="usage"><code>(nth n)</code></div><div class="doc"><div class="markdown"><p>Given a number, returns a lens that focuses on the given index of a collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L134">view source</a></div></div><div class="public anchor" id="var-only"><h3><a href="#var-only">only</a></h3><div class="usage"><code>(only applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a traversal that filters a coll.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L233">view source</a></div></div><div class="public anchor" id="var-over"><h3><a href="#var-over">over</a></h3><div class="usage"><code>(over st f s)</code></div><div class="doc"><div class="markdown"><p>Given a setter, a function and a state, apply the function over the value focused by the setter.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L78">view source</a></div></div><div class="public anchor" id="var-passes"><h3><a href="#var-passes">passes</a></h3><div class="usage"><code>(passes applies?)</code></div><div class="doc"><div class="markdown"><p>Given a predicate, return a lens that focuses in an element only if passes the predicate.</p><p>The lens is not well-behaved, depens on the outcome of the predicate.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L119">view source</a></div></div><div class="public anchor" id="var-put"><h3><a href="#var-put">put</a></h3><div class="usage"><code>(put st v s)</code></div><div class="doc"><div class="markdown"><p>Given a setter, a new value and a state, replace the value focused by the lens with the new one.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L85">view source</a></div></div><div class="public anchor" id="var-select-keys"><h3><a href="#var-select-keys">select-keys</a></h3><div class="usage"><code>(select-keys ks)</code></div><div class="doc"><div class="markdown"><p>Return a lens focused on the given keys in an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L173">view source</a></div></div><div class="public anchor" id="var-snd"><h3><a href="#var-snd">snd</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L145">view source</a></div></div><div class="public anchor" id="var-tail"><h3><a href="#var-tail">tail</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A lens into the tail of a collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L154">view source</a></div></div><div class="public anchor" id="var-traversal"><h3><a href="#var-traversal">traversal</a></h3><div class="usage"><code>(traversal getter setter)</code></div><div class="doc"><div class="markdown"><p>Given a function for getting the focused values from a state (getter) and a function that takes the state and and update function (setter), constructs a traversal.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L21">view source</a></div></div><div class="public anchor" id="var-units"><h3><a href="#var-units">units</a></h3><div class="usage"><code>(units one->other other->one)</code></div><div class="doc"><div class="markdown"><p>Given a function from unit A to unit B and another in the opposite direction, construct a lens that focuses and updates a converted value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L107">view source</a></div></div><div class="public anchor" id="var-vals"><h3><a href="#var-vals">vals</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Focus on the values of an associative data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/lens.cljc#L247">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html index e9b0c41..a3c75c4 100644 --- a/latest/api/cats.labs.manifold.html +++ b/latest/api/cats.labs.manifold.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L92">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L92">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.reader.html b/latest/api/cats.labs.reader.html index b977c92..5a5af1c 100644 --- a/latest/api/cats.labs.reader.html +++ b/latest/api/cats.labs.reader.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L175">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L181">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L41">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L64">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L124">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L75">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L168">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.reader documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.reader</h2><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="public anchor" id="var-ask"><h3><a href="#var-ask">ask</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L175">view source</a></div></div><div class="public anchor" id="var-local"><h3><a href="#var-local">local</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L181">view source</a></div></div><div class="public anchor" id="var-MonadReader"><h3><a href="#var-MonadReader">MonadReader</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows a read only access to an environment.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--ask"><h3><a href="#var--ask">-ask</a></h3><div class="usage"><code>(-ask m)</code></div><div class="doc"><div class="markdown"><p>Return the current environment.</p></div></div></div><div class="public anchor" id="var--local"><h3><a href="#var--local">-local</a></h3><div class="usage"><code>(-local m f reader)</code></div><div class="doc"><div class="markdown"><p>Create a reader in a modified version of the environment.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L41">view source</a></div></div><div class="public anchor" id="var-reader"><h3><a href="#var-reader">reader</a></h3><div class="usage"><code>(reader f)</code></div><div class="doc"><div class="markdown"><p>The Reader type constructor.</p><p>The purpose of Reader type is wrap a simple function that fullfill the reader signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L64">view source</a></div></div><div class="public anchor" id="var-reader-t"><h3><a href="#var-reader-t">reader-t</a></h3><div class="usage"><code>(reader-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The Reader transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L124">view source</a></div></div><div class="public anchor" id="var-reader.3F"><h3><a href="#var-reader.3F">reader?</a></h3><div class="usage"><code>(reader? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Reader type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L75">view source</a></div></div><div class="public anchor" id="var-run-reader"><h3><a href="#var-run-reader">run-reader</a></h3><div class="usage"><code>(run-reader reader seed)</code></div><div class="doc"><div class="markdown"><p>Given a Reader instance, execute the wrapped computation and returns a value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/reader.cljc#L168">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.state.html b/latest/api/cats.labs.state.html index 61c8226..98b3220 100644 --- a/latest/api/cats.labs.state.html +++ b/latest/api/cats.labs.state.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L238">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L247">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L43">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L221">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L67">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L131">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L78">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L215">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.state documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.state</h2><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="public anchor" id="var-eval-state"><h3><a href="#var-eval-state">eval-state</a></h3><div class="usage"><code>(eval-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant value, ignoring the state. Equivalent to taking the first value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L238">view source</a></div></div><div class="public anchor" id="var-exec-state"><h3><a href="#var-exec-state">exec-state</a></h3><div class="usage"><code>(exec-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and return the resultant state. Equivalent to taking the second value of the pair instance returned by <code>run-state</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L247">view source</a></div></div><div class="public anchor" id="var-get-state"><h3><a href="#var-get-state">get-state</a></h3><div class="usage"><code>(get-state)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that returns the current state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L203">view source</a></div></div><div class="public anchor" id="var-MonadState"><h3><a href="#var-MonadState">MonadState</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction for work with state in pure functional way.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-state"><h3><a href="#var--get-state">-get-state</a></h3><div class="usage"><code>(-get-state m)</code></div><div class="doc"><div class="markdown"><p>Return the current state.</p></div></div></div><div class="public anchor" id="var--put-state"><h3><a href="#var--put-state">-put-state</a></h3><div class="usage"><code>(-put-state m newstate)</code></div><div class="doc"><div class="markdown"><p>Update the state.</p></div></div></div><div class="public anchor" id="var--swap-state"><h3><a href="#var--swap-state">-swap-state</a></h3><div class="usage"><code>(-swap-state m f)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the current state and update it.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L43">view source</a></div></div><div class="public anchor" id="var-put-state"><h3><a href="#var-put-state">put-state</a></h3><div class="usage"><code>(put-state newstate)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that replaces the current state with specified new state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L209">view source</a></div></div><div class="public anchor" id="var-run-state"><h3><a href="#var-run-state">run-state</a></h3><div class="usage"><code>(run-state state seed)</code></div><div class="doc"><div class="markdown"><p>Given a State instance, execute the wrapped computation and returns a cats.data.Pair instance with result and new state.</p><p>(def computation (mlet [x (get-state) y (put-state (inc x))] (return y)))</p><p>(def initial-state 1) (run-state computation initial-state)</p><p>This should be return something to: #<Pair [1 2]></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L221">view source</a></div></div><div class="public anchor" id="var-state"><h3><a href="#var-state">state</a></h3><div class="usage"><code>(state f)</code></div><div class="doc"><div class="markdown"><p>The State type constructor.</p><p>The purpose of State type is wrap a simple function that fullfill the state signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L67">view source</a></div></div><div class="public anchor" id="var-state-t"><h3><a href="#var-state-t">state-t</a></h3><div class="usage"><code>(state-t inner-monad)</code></div><div class="doc"><div class="markdown"><p>The State transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L131">view source</a></div></div><div class="public anchor" id="var-state.3F"><h3><a href="#var-state.3F">state?</a></h3><div class="usage"><code>(state? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of the State type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L78">view source</a></div></div><div class="public anchor" id="var-swap-state"><h3><a href="#var-swap-state">swap-state</a></h3><div class="usage"><code>(swap-state f)</code></div><div class="doc"><div class="markdown"><p>Return a State instance with computation that applies the specified function to state and returns the old state.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/state.cljc#L215">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.sugar.html b/latest/api/cats.labs.sugar.html index cf7217d..700a63e 100644 --- a/latest/api/cats.labs.sugar.html +++ b/latest/api/cats.labs.sugar.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.sugar documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.sugar</h2><div class="doc"><div class="markdown"><p>Experimental syntax sugar for core abstractions. Sugar that proves its worthiness will graduate to the cats.core namespace.</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p><p>You can think of it as generalizing the <code>some-></code> thread macro to all Monads instead of just Maybe.</p><p>Alternatively, if you think of the regular thread macro as sugar for <code>let</code>:</p><p>(-> :a b (c (other args)) d) => (let [res (b :a) res (c res (other args)) res (d res)] res)</p><p>Then <code>->=</code> is sugar for cats.core/mlet:</p><p>(->= m-a b (c (other args)) d) (mlet [res m-a res (c res (other args)) res (d res)] (return res))</p><p>Note that extra args in this context are assumed pure, and will be evaluated along with the function itself; this also matches the behavior of <code>some-></code> wrt extra args.</p><p>Threading through pure functions is somewhat awkward, but can be done:</p><p>(->= m-a monadic-fn (-> pure-fn other-pure-fn m/return) other-monadic-fn)</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L116">view source</a></div></div><div class="public anchor" id="var--.3E.3E.3D"><h3><a href="#var--.3E.3E.3D">->>=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->>= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like ->>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L161">view source</a></div></div><div class="public anchor" id="var-ap"><h3><a href="#var-ap">ap</a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap f & args)</code></div><div class="doc"><div class="markdown"><p>Apply a pure function to applicative arguments, e.g.</p><p>(ap + (just 1) (just 2) (just 3)) ;; => #<Just [6]> (ap str [“hi” “lo”] [“bye” “woah” “hey”]) ;; => [“hibye” “hiwoah” “hihey” “lobye” “lowoah” “lohey”]</p><p><code>ap</code> is essentially sugar for <code>(apply fapply (pure f) args)</code>, but for the common case where you have a pure, uncurried, possibly variadic function.</p><p><code>ap</code> actually desugars in <code>alet</code> form:</p><p>(macroexpand-1 `(ap + (just 1) (just2))) ;; => (alet [a1 (just 1) a2 (just 2)] (+ a1 a2))</p><p>That way, variadic functions Just Work, without needing to specify an arity separately.</p><p>If you’re familiar with Haskell, this is closest to writing “in Applicative style”: you can straightforwardly convert pure function application to effectful application by with some light syntax (<$> and <*> in case of Haskell, and <code>ap</code> here).</p><p>See the original Applicative paper for more inspiration: <a href="http://staff.city.ac.uk/~ross/papers/Applicative.pdf">http://staff.city.ac.uk/~ross/papers/Applicative.pdf</a></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L35">view source</a></div></div><div class="public anchor" id="var-ap-.3E"><h3><a href="#var-ap-.3E">ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap-> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>-></code>, within an applicative idiom.</p><p>Compare:</p><p>(macroexpand-1 `(-> a b c (d e f))) => (d (c (b a) e f)</p><p>with:</p><p>(macroexpand-1 `(ap-> a b c (d e f)) => (ap d (ap c (ap b a) e f))</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L68">view source</a></div></div><div class="public anchor" id="var-ap-.3E.3E"><h3><a href="#var-ap-.3E.3E">ap->></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap->> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>->></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L91">view source</a></div></div><div class="public anchor" id="var-as-.3E.3D"><h3><a href="#var-as-.3E.3D">as->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(as->= expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>as-></code>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L171">view source</a></div></div><div class="public anchor" id="var-as-ap-.3E"><h3><a href="#var-as-ap-.3E">as-ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(as-ap-> expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>as-></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L104">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.sugar documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.sugar</h2><div class="doc"><div class="markdown"><p>Experimental syntax sugar for core abstractions. Sugar that proves its worthiness will graduate to the cats.core namespace.</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p><p>You can think of it as generalizing the <code>some-></code> thread macro to all Monads instead of just Maybe.</p><p>Alternatively, if you think of the regular thread macro as sugar for <code>let</code>:</p><p>(-> :a b (c (other args)) d) => (let [res (b :a) res (c res (other args)) res (d res)] res)</p><p>Then <code>->=</code> is sugar for cats.core/mlet:</p><p>(->= m-a b (c (other args)) d) (mlet [res m-a res (c res (other args)) res (d res)] (return res))</p><p>Note that extra args in this context are assumed pure, and will be evaluated along with the function itself; this also matches the behavior of <code>some-></code> wrt extra args.</p><p>Threading through pure functions is somewhat awkward, but can be done:</p><p>(->= m-a monadic-fn (-> pure-fn other-pure-fn m/return) other-monadic-fn)</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L116">view source</a></div></div><div class="public anchor" id="var--.3E.3E.3D"><h3><a href="#var--.3E.3E.3D">->>=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->>= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like ->>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L161">view source</a></div></div><div class="public anchor" id="var-ap"><h3><a href="#var-ap">ap</a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap f & args)</code></div><div class="doc"><div class="markdown"><p>Apply a pure function to applicative arguments, e.g.</p><p>(ap + (just 1) (just 2) (just 3)) ;; => #<Just [6]> (ap str [“hi” “lo”] [“bye” “woah” “hey”]) ;; => [“hibye” “hiwoah” “hihey” “lobye” “lowoah” “lohey”]</p><p><code>ap</code> is essentially sugar for <code>(apply fapply (pure f) args)</code>, but for the common case where you have a pure, uncurried, possibly variadic function.</p><p><code>ap</code> actually desugars in <code>alet</code> form:</p><p>(macroexpand-1 `(ap + (just 1) (just2))) ;; => (alet [a1 (just 1) a2 (just 2)] (+ a1 a2))</p><p>That way, variadic functions Just Work, without needing to specify an arity separately.</p><p>If you’re familiar with Haskell, this is closest to writing “in Applicative style”: you can straightforwardly convert pure function application to effectful application by with some light syntax (<$> and <*> in case of Haskell, and <code>ap</code> here).</p><p>See the original Applicative paper for more inspiration: <a href="http://staff.city.ac.uk/~ross/papers/Applicative.pdf">http://staff.city.ac.uk/~ross/papers/Applicative.pdf</a></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L35">view source</a></div></div><div class="public anchor" id="var-ap-.3E"><h3><a href="#var-ap-.3E">ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap-> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>-></code>, within an applicative idiom.</p><p>Compare:</p><p>(macroexpand-1 `(-> a b c (d e f))) => (d (c (b a) e f)</p><p>with:</p><p>(macroexpand-1 `(ap-> a b c (d e f)) => (ap d (ap c (ap b a) e f))</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L68">view source</a></div></div><div class="public anchor" id="var-ap-.3E.3E"><h3><a href="#var-ap-.3E.3E">ap->></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap->> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>->></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L91">view source</a></div></div><div class="public anchor" id="var-as-.3E.3D"><h3><a href="#var-as-.3E.3D">as->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(as->= expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>as-></code>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L171">view source</a></div></div><div class="public anchor" id="var-as-ap-.3E"><h3><a href="#var-as-ap-.3E">as-ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(as-ap-> expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>as-></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/sugar.cljc#L104">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.test.html b/latest/api/cats.labs.test.html new file mode 100644 index 0000000..bc3d5e1 --- /dev/null +++ b/latest/api/cats.labs.test.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.test documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.test</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-applicative-composition"><h3><a href="#var-applicative-composition">applicative-composition</a></h3><div class="usage"><code>(applicative-composition {:keys [ctx gen appf appg eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L143">view source</a></div></div><div class="public anchor" id="var-applicative-homomorphism"><h3><a href="#var-applicative-homomorphism">applicative-homomorphism</a></h3><div class="usage"><code>(applicative-homomorphism {:keys [ctx gen f eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L131">view source</a></div></div><div class="public anchor" id="var-applicative-identity-law"><h3><a href="#var-applicative-identity-law">applicative-identity-law</a></h3><div class="usage"><code>(applicative-identity-law {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L125">view source</a></div></div><div class="public anchor" id="var-applicative-interchange"><h3><a href="#var-applicative-interchange">applicative-interchange</a></h3><div class="usage"><code>(applicative-interchange {:keys [ctx gen appf eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L137">view source</a></div></div><div class="public anchor" id="var-bifunctor-bimap-identity"><h3><a href="#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a></h3><div class="usage"><code>(bifunctor-bimap-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L111">view source</a></div></div><div class="public anchor" id="var-bifunctor-composition"><h3><a href="#var-bifunctor-composition">bifunctor-composition</a></h3><div class="usage"><code>(bifunctor-composition {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L117">view source</a></div></div><div class="public anchor" id="var-bifunctor-first-identity"><h3><a href="#var-bifunctor-first-identity">bifunctor-first-identity</a></h3><div class="usage"><code>(bifunctor-first-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L100">view source</a></div></div><div class="public anchor" id="var-bifunctor-second-identity"><h3><a href="#var-bifunctor-second-identity">bifunctor-second-identity</a></h3><div class="usage"><code>(bifunctor-second-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L105">view source</a></div></div><div class="public anchor" id="var-first-functor-law"><h3><a href="#var-first-functor-law">first-functor-law</a></h3><div class="usage"><code>(first-functor-law {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L86">view source</a></div></div><div class="public anchor" id="var-first-monad-law"><h3><a href="#var-first-monad-law">first-monad-law</a></h3><div class="usage"><code>(first-monad-law {:keys [ctx mf gen eq], :or {gen gen/any, eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L155">view source</a></div></div><div class="public anchor" id="var-gen-context"><h3><a href="#var-gen-context">gen-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L35">view source</a></div></div><div class="public anchor" id="var-monadplus-associativity"><h3><a href="#var-monadplus-associativity">monadplus-associativity</a></h3><div class="usage"><code>(monadplus-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L177">view source</a></div></div><div class="public anchor" id="var-monadzero-bind"><h3><a href="#var-monadzero-bind">monadzero-bind</a></h3><div class="usage"><code>(monadzero-bind {:keys [ctx gen zero eq], :or {zero (m/mzero ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L196">view source</a></div></div><div class="public anchor" id="var-monadzero-identity-element"><h3><a href="#var-monadzero-identity-element">monadzero-identity-element</a></h3><div class="usage"><code>(monadzero-identity-element {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L188">view source</a></div></div><div class="public anchor" id="var-monoid-identity-element"><h3><a href="#var-monoid-identity-element">monoid-identity-element</a></h3><div class="usage"><code>(monoid-identity-element {:keys [ctx gen empty eq], :or {empty (m/mempty ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L76">view source</a></div></div><div class="public anchor" id="var-second-functor-law"><h3><a href="#var-second-functor-law">second-functor-law</a></h3><div class="usage"><code>(second-functor-law {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L92">view source</a></div></div><div class="public anchor" id="var-second-monad-law"><h3><a href="#var-second-monad-law">second-monad-law</a></h3><div class="usage"><code>(second-monad-law {:keys [ctx eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L161">view source</a></div></div><div class="public anchor" id="var-semigroup-associativity"><h3><a href="#var-semigroup-associativity">semigroup-associativity</a></h3><div class="usage"><code>(semigroup-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L65">view source</a></div></div><div class="public anchor" id="var-third-monad-law"><h3><a href="#var-third-monad-law">third-monad-law</a></h3><div class="usage"><code>(third-monad-law {:keys [ctx f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L168">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.writer.html b/latest/api/cats.labs.writer.html index 1655011..03ec7b6 100644 --- a/latest/api/cats.labs.writer.html +++ b/latest/api/cats.labs.writer.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L195">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L206">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L45">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L200">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L190">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L205">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L75">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L132">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.writer documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3 current"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.writer</h2><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="public anchor" id="var-listen"><h3><a href="#var-listen">listen</a></h3><div class="usage"><code>(listen mv)</code></div><div class="doc"><div class="markdown"><p>Get the value from the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L195">view source</a></div></div><div class="public anchor" id="var-log"><h3><a href="#var-log">log</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L206">view source</a></div></div><div class="public anchor" id="var-MonadWriter"><h3><a href="#var-MonadWriter">MonadWriter</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A specific case of Monad abstraction that allows emulate write operations in pure functional way.</p><p>A great example is writing a log message.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--listen"><h3><a href="#var--listen">-listen</a></h3><div class="usage"><code>(-listen m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer, yield a (value, log) pair as a value.</p></div></div></div><div class="public anchor" id="var--pass"><h3><a href="#var--pass">-pass</a></h3><div class="usage"><code>(-pass m mv)</code></div><div class="doc"><div class="markdown"><p>Given a writer whose value is a pair with a function as its second element, yield a writer which has the first element of the pair as the value and the result of applying the aforementioned function to the log as the new log.</p></div></div></div><div class="public anchor" id="var--tell"><h3><a href="#var--tell">-tell</a></h3><div class="usage"><code>(-tell m v)</code></div><div class="doc"><div class="markdown"><p>Add the given value to the log.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L45">view source</a></div></div><div class="public anchor" id="var-pass"><h3><a href="#var-pass">pass</a></h3><div class="usage"><code>(pass mv)</code></div><div class="doc"><div class="markdown"><p>Apply a function to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L200">view source</a></div></div><div class="public anchor" id="var-tell"><h3><a href="#var-tell">tell</a></h3><div class="usage"><code>(tell v)</code></div><div class="doc"><div class="markdown"><p>Add the value to the log.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L190">view source</a></div></div><div class="public anchor" id="var-value"><h3><a href="#var-value">value</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L205">view source</a></div></div><div class="public anchor" id="var-writer"><h3><a href="#var-writer">writer</a></h3><div class="usage"><code>(writer f)</code></div><div class="doc"><div class="markdown"><p>The Writer type constructor.</p><p>The purpose of Writer type is wrap a simple function that fullfill the writer signature.</p><p>It exists just for avoid extend the clojure function type because is very generic type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L75">view source</a></div></div><div class="public anchor" id="var-writer-t"><h3><a href="#var-writer-t">writer-t</a></h3><div class="usage"><code>(writer-t inner-context)</code></div><div class="doc"><div class="markdown"><p>The Writer transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L132">view source</a></div></div><div class="public anchor" id="var-writer.3F"><h3><a href="#var-writer.3F">writer?</a></h3><div class="usage"><code>(writer? s)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>s</code> is instance of Writer type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/writer.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index f089206..4f7c1bf 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) @@ -7,4 +7,4 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L261">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L271">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L279">view source</a></div></div><div class="public anchor" id="var-either-t"><h3><a href="#var-either-t">either-t</a></h3><div class="usage"><code>(either-t inner)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L218">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L138">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L297">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L301">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L305">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L126">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L289">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L121">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L132">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L293">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L267">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L279">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L287">view source</a></div></div><div class="public anchor" id="var-either"><h3><a href="#var-either">either</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L277">view source</a></div></div><div class="public anchor" id="var-either-t"><h3><a href="#var-either-t">either-t</a></h3><div class="usage"><code>(either-t inner)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L224">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L138">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L305">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L309">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L313">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L126">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L297">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L121">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L132">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L301">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index acae773..db56b44 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L192">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L64">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L70">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L251">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L192">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L64">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L70">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L251">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 5f37a22..9cfd4a4 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L73">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L73">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index d6bf361..b7ee93c 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index 534bba0..0712284 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L66">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L75">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L62">view source</a></div></div><div class="public anchor" id="var-JoinSemiLattice"><h3><a href="#var-JoinSemiLattice">JoinSemiLattice</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A algebraic structure with element joins.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--join"><h3><a href="#var--join">-join</a></h3><div class="usage"><code>(-join _ other)</code></div><div class="doc"><div class="markdown"><p>Converge two data structures.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L108">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L87">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L97">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L102">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L92">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L53">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Just an abstraction for make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L49">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L80">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Bifunctor"><h3><a href="#var-Bifunctor">Bifunctor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A ‘Functor’ of two arguments.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--bimap"><h3><a href="#var--bimap">-bimap</a></h3><div class="usage"><code>(-bimap btor f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L66">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L79">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L62">view source</a></div></div><div class="public anchor" id="var-JoinSemiLattice"><h3><a href="#var-JoinSemiLattice">JoinSemiLattice</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A algebraic structure with element joins.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--join"><h3><a href="#var--join">-join</a></h3><div class="usage"><code>(-join _ other)</code></div><div class="doc"><div class="markdown"><p>Converge two data structures.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L112">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L91">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L101">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L106">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L96">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L53">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Just an abstraction for make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L49">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.util.html b/latest/api/cats.util.html index 9006db8..1f90fda 100644 --- a/latest/api/cats.util.html +++ b/latest/api/cats.util.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 9e0b886..ea0584a 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.1.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -455px;"><span class="top" style="height: 464px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.html">cats.labs.crdt</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.html#var--decode">-decode</a> </li><li> <a href="cats.labs.crdt.html#var--encode">-encode</a> </li><li> <a href="cats.labs.crdt.html#var--load">-load</a> </li><li> <a href="cats.labs.crdt.html#var-dec">dec</a> </li><li> <a href="cats.labs.crdt.html#var-decode">decode</a> </li><li> <a href="cats.labs.crdt.html#var-encode">encode</a> </li><li> <a href="cats.labs.crdt.html#var-inc">inc</a> </li><li> <a href="cats.labs.crdt.html#var-inc-by">inc-by</a> </li><li> <a href="cats.labs.crdt.html#var-ISerializable">ISerializable</a> </li><li> <a href="cats.labs.crdt.html#var-merge">merge</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gcounter.html">cats.labs.crdt.gcounter</a></h3><div class="doc"><div class="markdown"><p>A G-Counter is a grow-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current actor.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gcounter.html#var--.3EGCounter">->GCounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter">gcounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter*">gcounter*</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter.3F">gcounter?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gset.html">cats.labs.crdt.gset</a></h3><div class="doc"><div class="markdown"><p>Set union is commutative and convergent; hence it is always safe to have simultaneous writes to a set which only allows addition. You cannot remove an element of a G-Set.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gset.html#var--.3EGSet">->GSet</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset">gset</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset*">gset*</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset.3F">gset?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.pncounter.html">cats.labs.crdt.pncounter</a></h3><div class="doc"><div class="markdown"><p>PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as internal G-Counters.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.pncounter.html#var--.3EPNCounter">->PNCounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter">pncounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter*">pncounter*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.protocols.html">cats.labs.crdt.protocols</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.protocols.html#var-*node*">*node*</a> </li><li> <a href="cats.labs.crdt.protocols.html#var-ICounter">ICounter</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.util.html">cats.labs.crdt.util</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.util.html#var-hostname">hostname</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.lens.html">cats.labs.lens</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.lens.html#var--.3EFoci">->Foci</a> </li><li> <a href="cats.labs.lens.html#var--.3EFocus">->Focus</a> </li><li> <a href="cats.labs.lens.html#var-both">both</a> </li><li> <a href="cats.labs.lens.html#var-cat">cat</a> </li><li> <a href="cats.labs.lens.html#var-const-setter">const-setter</a> </li><li> <a href="cats.labs.lens.html#var-each">each</a> </li><li> <a href="cats.labs.lens.html#var-ffoci">ffoci</a> </li><li> <a href="cats.labs.lens.html#var-filter">filter</a> </li><li> <a href="cats.labs.lens.html#var-foci">foci</a> </li><li> <a href="cats.labs.lens.html#var-foci-atom">foci-atom</a> </li><li> <a href="cats.labs.lens.html#var-focus">focus</a> </li><li> <a href="cats.labs.lens.html#var-focus-atom">focus-atom</a> </li><li> <a href="cats.labs.lens.html#var-fst">fst</a> </li><li> <a href="cats.labs.lens.html#var-id">id</a> </li><li> <a href="cats.labs.lens.html#var-id-setter">id-setter</a> </li><li> <a href="cats.labs.lens.html#var-in">in</a> </li><li> <a href="cats.labs.lens.html#var-indexed">indexed</a> </li><li> <a href="cats.labs.lens.html#var-it">it</a> </li><li> <a href="cats.labs.lens.html#var-key">key</a> </li><li> <a href="cats.labs.lens.html#var-keys">keys</a> </li><li> <a href="cats.labs.lens.html#var-lens">lens</a> </li><li> <a href="cats.labs.lens.html#var-lens-.3Etraversal">lens->traversal</a> </li><li> <a href="cats.labs.lens.html#var-nothing">nothing</a> </li><li> <a href="cats.labs.lens.html#var-nth">nth</a> </li><li> <a href="cats.labs.lens.html#var-only">only</a> </li><li> <a href="cats.labs.lens.html#var-over">over</a> </li><li> <a href="cats.labs.lens.html#var-passes">passes</a> </li><li> <a href="cats.labs.lens.html#var-put">put</a> </li><li> <a href="cats.labs.lens.html#var-select-keys">select-keys</a> </li><li> <a href="cats.labs.lens.html#var-snd">snd</a> </li><li> <a href="cats.labs.lens.html#var-tail">tail</a> </li><li> <a href="cats.labs.lens.html#var-traversal">traversal</a> </li><li> <a href="cats.labs.lens.html#var-units">units</a> </li><li> <a href="cats.labs.lens.html#var-vals">vals</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.sugar.html">cats.labs.sugar</a></h3><div class="doc"><div class="markdown"><p>Experimental syntax sugar for core abstractions. Sugar that proves its worthiness will graduate to the cats.core namespace.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.sugar.html#var--.3E.3D">->=</a> </li><li> <a href="cats.labs.sugar.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.labs.sugar.html#var-ap">ap</a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.labs.sugar.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.labs.sugar.html#var-as-ap-.3E">as-ap-></a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-JoinSemiLattice">JoinSemiLattice</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.2.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-branch">branch</a> </li><li> <a href="cats.applicative.validation.html#var-branch-fail">branch-fail</a> </li><li> <a href="cats.applicative.validation.html#var-branch-ok">branch-ok</a> </li><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation">validation</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bimap">bimap</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-left-map">left-map</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-a">lift-a</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-right-map">right-map</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.html">cats.labs.crdt</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.html#var--decode">-decode</a> </li><li> <a href="cats.labs.crdt.html#var--encode">-encode</a> </li><li> <a href="cats.labs.crdt.html#var--load">-load</a> </li><li> <a href="cats.labs.crdt.html#var-dec">dec</a> </li><li> <a href="cats.labs.crdt.html#var-decode">decode</a> </li><li> <a href="cats.labs.crdt.html#var-encode">encode</a> </li><li> <a href="cats.labs.crdt.html#var-inc">inc</a> </li><li> <a href="cats.labs.crdt.html#var-inc-by">inc-by</a> </li><li> <a href="cats.labs.crdt.html#var-ISerializable">ISerializable</a> </li><li> <a href="cats.labs.crdt.html#var-merge">merge</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gcounter.html">cats.labs.crdt.gcounter</a></h3><div class="doc"><div class="markdown"><p>A G-Counter is a grow-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current actor.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gcounter.html#var--.3EGCounter">->GCounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter">gcounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter*">gcounter*</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter.3F">gcounter?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gset.html">cats.labs.crdt.gset</a></h3><div class="doc"><div class="markdown"><p>Set union is commutative and convergent; hence it is always safe to have simultaneous writes to a set which only allows addition. You cannot remove an element of a G-Set.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gset.html#var--.3EGSet">->GSet</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset">gset</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset*">gset*</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset.3F">gset?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.pncounter.html">cats.labs.crdt.pncounter</a></h3><div class="doc"><div class="markdown"><p>PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as internal G-Counters.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.pncounter.html#var--.3EPNCounter">->PNCounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter">pncounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter*">pncounter*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.protocols.html">cats.labs.crdt.protocols</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.protocols.html#var-*node*">*node*</a> </li><li> <a href="cats.labs.crdt.protocols.html#var-ICounter">ICounter</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.util.html">cats.labs.crdt.util</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.util.html#var-hostname">hostname</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.lens.html">cats.labs.lens</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.lens.html#var--.3EFoci">->Foci</a> </li><li> <a href="cats.labs.lens.html#var--.3EFocus">->Focus</a> </li><li> <a href="cats.labs.lens.html#var-both">both</a> </li><li> <a href="cats.labs.lens.html#var-cat">cat</a> </li><li> <a href="cats.labs.lens.html#var-const-setter">const-setter</a> </li><li> <a href="cats.labs.lens.html#var-each">each</a> </li><li> <a href="cats.labs.lens.html#var-ffoci">ffoci</a> </li><li> <a href="cats.labs.lens.html#var-filter">filter</a> </li><li> <a href="cats.labs.lens.html#var-foci">foci</a> </li><li> <a href="cats.labs.lens.html#var-foci-atom">foci-atom</a> </li><li> <a href="cats.labs.lens.html#var-focus">focus</a> </li><li> <a href="cats.labs.lens.html#var-focus-atom">focus-atom</a> </li><li> <a href="cats.labs.lens.html#var-fst">fst</a> </li><li> <a href="cats.labs.lens.html#var-id">id</a> </li><li> <a href="cats.labs.lens.html#var-id-setter">id-setter</a> </li><li> <a href="cats.labs.lens.html#var-in">in</a> </li><li> <a href="cats.labs.lens.html#var-indexed">indexed</a> </li><li> <a href="cats.labs.lens.html#var-it">it</a> </li><li> <a href="cats.labs.lens.html#var-key">key</a> </li><li> <a href="cats.labs.lens.html#var-keys">keys</a> </li><li> <a href="cats.labs.lens.html#var-lens">lens</a> </li><li> <a href="cats.labs.lens.html#var-lens-.3Etraversal">lens->traversal</a> </li><li> <a href="cats.labs.lens.html#var-nothing">nothing</a> </li><li> <a href="cats.labs.lens.html#var-nth">nth</a> </li><li> <a href="cats.labs.lens.html#var-only">only</a> </li><li> <a href="cats.labs.lens.html#var-over">over</a> </li><li> <a href="cats.labs.lens.html#var-passes">passes</a> </li><li> <a href="cats.labs.lens.html#var-put">put</a> </li><li> <a href="cats.labs.lens.html#var-select-keys">select-keys</a> </li><li> <a href="cats.labs.lens.html#var-snd">snd</a> </li><li> <a href="cats.labs.lens.html#var-tail">tail</a> </li><li> <a href="cats.labs.lens.html#var-traversal">traversal</a> </li><li> <a href="cats.labs.lens.html#var-units">units</a> </li><li> <a href="cats.labs.lens.html#var-vals">vals</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.sugar.html">cats.labs.sugar</a></h3><div class="doc"><div class="markdown"><p>Experimental syntax sugar for core abstractions. Sugar that proves its worthiness will graduate to the cats.core namespace.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.sugar.html#var--.3E.3D">->=</a> </li><li> <a href="cats.labs.sugar.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.labs.sugar.html#var-ap">ap</a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.labs.sugar.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.labs.sugar.html#var-as-ap-.3E">as-ap-></a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.test.html">cats.labs.test</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.test.html#var-applicative-composition">applicative-composition</a> </li><li> <a href="cats.labs.test.html#var-applicative-homomorphism">applicative-homomorphism</a> </li><li> <a href="cats.labs.test.html#var-applicative-identity-law">applicative-identity-law</a> </li><li> <a href="cats.labs.test.html#var-applicative-interchange">applicative-interchange</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-composition">bifunctor-composition</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-first-identity">bifunctor-first-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-second-identity">bifunctor-second-identity</a> </li><li> <a href="cats.labs.test.html#var-first-functor-law">first-functor-law</a> </li><li> <a href="cats.labs.test.html#var-first-monad-law">first-monad-law</a> </li><li> <a href="cats.labs.test.html#var-gen-context">gen-context</a> </li><li> <a href="cats.labs.test.html#var-monadplus-associativity">monadplus-associativity</a> </li><li> <a href="cats.labs.test.html#var-monadzero-bind">monadzero-bind</a> </li><li> <a href="cats.labs.test.html#var-monadzero-identity-element">monadzero-identity-element</a> </li><li> <a href="cats.labs.test.html#var-monoid-identity-element">monoid-identity-element</a> </li><li> <a href="cats.labs.test.html#var-second-functor-law">second-functor-law</a> </li><li> <a href="cats.labs.test.html#var-second-monad-law">second-monad-law</a> </li><li> <a href="cats.labs.test.html#var-semigroup-associativity">semigroup-associativity</a> </li><li> <a href="cats.labs.test.html#var-third-monad-law">third-monad-law</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either">either</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Bifunctor">Bifunctor</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-JoinSemiLattice">JoinSemiLattice</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index d19dc14..ef9d46e 100644 --- a/latest/index.html +++ b/latest/index.html @@ -80,7 +80,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">1.1.0</span> +<span id="revdate">1.2.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -126,6 +126,7 @@ <h1>Cats Documentation</h1> </li> <li><a href="#labs">Labs</a> <ul class="sectlevel2"> +<li><a href="#test-check">test.check</a></li> <li><a href="#channel">Channel</a></li> <li><a href="#manifold-deferred">Manifold Deferred</a></li> <li><a href="#state">State</a></li> @@ -242,7 +243,7 @@ <h2 id="install"><a class="link" href="#install">Install</a></h2> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.1.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.2.0"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -1823,6 +1824,51 @@ <h2 id="labs"><a class="link" href="#labs">Labs</a></h2> each section.</p> </div> <div class="sect2"> +<h3 id="test-check"><a class="link" href="#test-check">test.check</a></h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>The <code>cats.labs.test</code> namespace implements monad and applicative instances for +generators, which lets you use the <code>cats.core/alet</code> and <code>cats.core/mlet</code> macros +for writing generators:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.test</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">clojure.test.check.generators</span> <span class="tok-ss">:as</span> <span class="tok-nv">gen</span><span class="tok-p">])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">color</span> + <span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">r</span> <span class="tok-nv">gen/int</span> + <span class="tok-nv">g</span> <span class="tok-nv">gen/int</span> + <span class="tok-nv">b</span> <span class="tok-nv">gen/int</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-nv">r</span> <span class="tok-nv">g</span> <span class="tok-nv">b</span><span class="tok-p">]))</span> + +<span class="tok-p">(</span><span class="tok-nf">gen/sample</span> <span class="tok-nv">color</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => ([0 0 0])</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">mcolor</span> + <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">r</span> <span class="tok-nv">gen/int</span> + <span class="tok-nv">g</span> <span class="tok-nv">gen/int</span> + <span class="tok-nv">b</span> <span class="tok-nv">gen/int</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">[</span><span class="tok-nv">r</span> <span class="tok-nv">g</span> <span class="tok-nv">b</span><span class="tok-p">])))</span> + +<span class="tok-p">(</span><span class="tok-nf">gen/sample</span> <span class="tok-nv">mcolor</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => ([0 0 0])</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>Apart from that, the namespace contains multiple functions for generating test.check +properties that verify the laws of Semigroup, Monoid, Functor, Applicative, Monad, +MonadZero and MonadPlus.</p> +</div> +<div class="paragraph"> +<p>The implementation of cats' abstractions are tested using generative testing and +the <code>cats.labs.test</code> property generation functions.</p> +</div> +</div> +<div class="sect2"> <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> <div class="paragraph"> <p><strong>Status:</strong> Experimental</p> @@ -2799,7 +2845,7 @@ <h3 id="license"><a class="link" href="#license">License</a></h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-11-26 19:12:26 EET +Last updated 2015-12-16 00:55:47 EET </div> </div> </body> From 42827045cdc524572ca042d933dad90230eef923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20G=C3=B3mez?= <alejandro@dialelo.com> Date: Sun, 3 Jan 2016 11:39:50 +0100 Subject: [PATCH 49/52] Generate documentation --- latest/index.html | 352 +++++++++++++++++++++++++++------------------- 1 file changed, 208 insertions(+), 144 deletions(-) diff --git a/latest/index.html b/latest/index.html index ef9d46e..e83a560 100644 --- a/latest/index.html +++ b/latest/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.2"> +<meta name="generator" content="Asciidoctor 1.5.3"> <meta name="author" content="Andrey Antukh & Alejandro Gómez"> <title>Cats Documentation</title> <style> @@ -80,7 +80,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">1.2.0</span> +<span id="revdate">1.2.1</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -134,6 +134,7 @@ <h1>Cats Documentation</h1> <li><a href="#writer">Writer</a></li> <li><a href="#continuation">Continuation</a></li> <li><a href="#lens">Lens</a></li> +<li><a href="#traversals">Traversals</a></li> </ul> </li> <li><a href="#complementary-libraries">Complementary libraries</a></li> @@ -243,7 +244,7 @@ <h2 id="install"><a class="link" href="#install">Install</a></h2> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.2.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.2.1"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -274,6 +275,7 @@ <h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> <span class="tok-c1">;; => [1 2 3 4 5 6]</span></code></pre> @@ -286,6 +288,7 @@ <h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> @@ -307,6 +310,7 @@ <h3 id="monoid"><a class="link" href="#monoid">Monoid</a></h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> @@ -569,7 +573,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> </div> <div class="paragraph"> -<p>In contrast to the <code>foldr</code> internal execution model:</p> +<p>In contrast to the <code>foldr</code> internal execution model that looks like that:</p> </div> <div class="listingblock"> <div class="content"> @@ -1016,6 +1020,10 @@ <h4 id="using-monad-transformers"><a class="link" href="#using-monad-transformer <div class="sect1"> <h2 id="types"><a class="link" href="#types">Types</a></h2> <div class="sectionbody"> +<div class="paragraph"> +<p>This section will take a tour over the types exposed in cats library and explain +how they can be used in the previously explained abstractions.</p> +</div> <div class="sect2"> <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <div class="paragraph"> @@ -1278,7 +1286,7 @@ <h3 id="built-in-types"><a class="link" href="#built-in-types">Built in types</a </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">])</span> @@ -1419,27 +1427,21 @@ <h4 id="map"><a class="link" href="#map">Map</a></h4> <div class="sect1"> <h2 id="syntax-sugar"><a class="link" href="#syntax-sugar">Syntax sugar</a></h2> <div class="sectionbody"> +<div class="paragraph"> +<p>Additionally to the abstractions and types, <strong>cats</strong> exposes some powerfull +syntax abstractions that surelly will make the usage of that abstractions +in a more familiar way.</p> +</div> <div class="sect2"> <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> <div class="paragraph"> -<p>For convenience when using the monadic bind the <code>mlet</code> macro is implemented in -cats. If you’ve followed along with the documentation you’ve seen many examples -of its usage already, let’s see what can <code>mlet</code> do.</p> -</div> -<div class="admonitionblock note"> -<table> -<tr> -<td class="icon"> -<div class="title">Note</div> -</td> -<td class="content"> -If you are coming from Haskell, mlet is analogous to the <strong>do notation</strong>. -</td> -</tr> -</table> +<p>The <code>mlet</code> syntactic abstraction intends to facilitate the composition +of monadic operations.</p> </div> <div class="paragraph"> -<p>First of all, mlet turns this let-like bindings</p> +<p>If you’ve followed along with the documentation you’ve seen many examples +of its usage already, let’s see what can <code>mlet</code> do. First of all, mlet turns +this let-like bindings:</p> </div> <div class="listingblock"> <div class="content"> @@ -1461,7 +1463,12 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> </div> </div> <div class="paragraph"> -<p>This makes a lot more natural to write code that uses monads.</p> +<p>That makes a lot more natural to write code that uses monads and gives a very +familiar <code>let</code> like syntax abstraction that makes the clojure code that uses +monads less "strange".</p> +</div> +<div class="paragraph"> +<p>If you are coming from Haskell, mlet is mostly analogous to the <strong>do notation</strong>.</p> </div> <div class="paragraph"> <p>Since the bindings in the mlet macro run the monadic effects of the right-hand @@ -1585,19 +1592,22 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> <p>This makes no difference at all for Maybe, but applicatives that have latency in their calculations (for example promises that do an async computation) get a pretty good evaluation strategy, which can minimize overall latency. In the -next examples we use the <a href="https://github.com/funcool/promissum">promissum</a> -Clojure library. Similar results can be achieved in ClojureScript with the -<a href="https://github.com/funcool/promesa">promesa</a> library.</p> +next examples we use the <a href="https://github.com/funcool/promesa">promesa</a> +clj/cljs library for emulate asynchronous behavior:</p> </div> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">promissum.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">p</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">promesa.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">p</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">sleep-promise</span> <span class="tok-p">[</span><span class="tok-nv">wait</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">p/promise</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">deliver</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">Thread/sleep</span> <span class="tok-nv">wait</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">deliver</span> <span class="tok-nv">wait</span><span class="tok-p">))))</span> +<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">sleep-promise</span> + <span class="tok-s">"A simple function that emulates an</span> +<span class="tok-s"> asynchronous operation."</span> + <span class="tok-p">[</span><span class="tok-nv">wait</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">p/promise</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nb">resolve </span><span class="tok-nv">reject</span><span class="tok-p">]</span> + <span class="tok-p">(</span><span class="tok-nf">future</span> + <span class="tok-p">(</span><span class="tok-nf">Thread/sleep</span> <span class="tok-nv">wait</span><span class="tok-p">)</span> + <span class="tok-p">(</span><span class="tok-nb">resolve </span><span class="tok-nv">wait</span><span class="tok-p">)))))</span> <span class="tok-c1">;; note: deref-ing for blocking the current thread</span> <span class="tok-c1">;; waiting for the promise being delivered</span> @@ -1882,7 +1892,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.2.371"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.2.374"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -1893,7 +1903,8 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-ss">'cats.labs.channel</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">clojure.core.async</span> <span class="tok-ss">:as</span> <span class="tok-nv">a</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.channel</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">async-call</span> <span class="tok-s">"A function that emulates some asynchronous call."</span> @@ -2311,15 +2322,15 @@ <h3 id="continuation"><a class="link" href="#continuation">Continuation</a></h3> <div class="sect2"> <h3 id="lens"><a class="link" href="#lens">Lens</a></h3> <div class="paragraph"> -<p><strong>Status:</strong> Experimental</p> +<p><strong>Status:</strong> Stable</p> </div> <div class="paragraph"> -<p>This namespace implements functional references to one (lens) or multiple -(traversal) values modeled as functions. Lenses and traversals generalize the -get, put and mapping to a particular part of a data structure.</p> +<p>Implementation of functional references to one value modeled as functions. Is +a generalization of get and put mapping to the particular part of a data +structure.</p> </div> <div class="sect3"> -<h4 id="lenses"><a class="link" href="#lenses">Lenses</a></h4> +<h4 id="first-steps"><a class="link" href="#first-steps">First steps</a></h4> <div class="paragraph"> <p>We’ll start by using the most basic lens, the identity lens. We can get the value a lens is focused on using the <code>focus</code> function in <code>cats.labs.lens</code> ns:</p> @@ -2346,25 +2357,29 @@ <h4 id="lenses"><a class="link" href="#lenses">Lenses</a></h4> </div> </div> <div class="paragraph"> -<p>We can focus on the first (<code>fst</code>), (<code>second</code>), or nth (<code>nth</code>) element of a list -with a lens:</p> +<p>There are some builtin lenses that can be used out of the box such as <code>fst</code>, <code>snd</code> +and <code>nth</code>. Let see some examples on how them can be used:</p> </div> <div class="listingblock"> +<div class="title">Example using <code>fst</code> lense</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-c1">;; fst</span> - +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-c1">;; Focus over the first element of a vector</span> <span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">l/fst</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => 1</span> +<span class="tok-c1">;; Apply a function over first element of a vector</span> <span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/fst</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 2 3]</span> +<span class="tok-c1">;; Replace the first value of an element of a vector</span> <span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/fst</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [42 2 3]</span> - -<span class="tok-c1">;; nth</span> - -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-c1">;; => [42 2 3]</span></code></pre> +</div> +</div> +<div class="listingblock"> +<div class="title">Example using the <code>nth</code> lense</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => 3</span> <span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> @@ -2374,60 +2389,40 @@ <h4 id="lenses"><a class="link" href="#lenses">Lenses</a></h4> <span class="tok-c1">;; => [1 2 42]</span></code></pre> </div> </div> +</div> +<div class="sect3"> +<h4 id="lenses-composition"><a class="link" href="#lenses-composition">Lenses composition</a></h4> <div class="paragraph"> -<p>And compose them arbitrarily using function composition:</p> +<p>One of the big advantatges of the lenses implementation of cats library is that +them are implemented using plain functions:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-c1">;; fst</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">my-lens</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/fst</span> <span class="tok-nv">l/fst</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">data</span> + <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> + <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/fst</span> <span class="tok-nv">l/fst</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">))</span> - <span class="tok-p">[[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-mi">6</span> <span class="tok-mi">7</span> <span class="tok-mi">8</span><span class="tok-p">]])</span> +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">my-lens</span> <span class="tok-nv">data</span><span class="tok-p">)</span> <span class="tok-c1">;; => 2</span> -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/fst</span> <span class="tok-nv">l/fst</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">))</span> - <span class="tok-mi">42</span> - <span class="tok-p">[[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-mi">6</span> <span class="tok-mi">7</span> <span class="tok-mi">8</span><span class="tok-p">]])</span> -<span class="tok-c1">;; => [[[0 1 42] [3 4 5]] [6 7 8]]</span></code></pre> +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">my-lens</span> <span class="tok-mi">42</span> <span class="tok-nv">data</span><span class="tok-p">)</span> +<span class="tok-c1">;; => [[0 1 42] [3 4 5]]</span></code></pre> </div> </div> <div class="paragraph"> <p>Lenses compose with regular function composition and, like transducers, the combined lens runs from left to right.</p> </div> -<div class="paragraph"> -<p>The <code>passes</code> function accepts a predicate and returns a lens that focuses -in an element only if it passes the predicate.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 2</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 3</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span> - -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => nil</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 1</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 1</span></code></pre> -</div> </div> +<div class="sect3"> +<h4 id="builtin-lenses"><a class="link" href="#builtin-lenses">Builtin lenses</a></h4> <div class="paragraph"> <p>There’s <code>key</code> and <code>select-keys</code> for focusing on one or multiple keys respectively:</p> </div> <div class="listingblock"> +<div class="title">Example focusing in a specific key/keys of associative data structure</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/key</span> <span class="tok-ss">:a</span><span class="tok-p">)</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> <span class="tok-c1">;; => 1</span> @@ -2457,14 +2452,13 @@ <h4 id="lenses"><a class="link" href="#lenses">Lenses</a></h4> <p><code>in</code> for focusing on a path:</p> </div> <div class="listingblock"> +<div class="title">Example focusing in neest data structures</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> <span class="tok-c1">;; => {:c 42}</span> -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nb">zipmap </span><span class="tok-p">(</span><span class="tok-nb">vals </span><span class="tok-nv">m</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nb">keys </span><span class="tok-nv">m</span><span class="tok-p">)))</span> +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">zipmap </span><span class="tok-p">(</span><span class="tok-nb">vals </span><span class="tok-nv">%</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nb">keys </span><span class="tok-nv">%</span><span class="tok-p">))</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> <span class="tok-c1">;; => {:a {:b {42 :c}}}</span> @@ -2480,6 +2474,7 @@ <h4 id="lenses"><a class="link" href="#lenses">Lenses</a></h4> and viceversa:</p> </div> <div class="listingblock"> +<div class="title">Example definiting a "unit conversion" lense</div> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">sec->min</span> <span class="tok-p">[</span><span class="tok-nv">sec</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">/ </span><span class="tok-nv">sec</span> <span class="tok-mi">60</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">min->sec</span> <span class="tok-p">[</span><span class="tok-nv">min</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">* min </span><span class="tok-mi">60</span><span class="tok-p">))</span> @@ -2497,59 +2492,147 @@ <h4 id="lenses"><a class="link" href="#lenses">Lenses</a></h4> <span class="tok-c1">;; => 120</span></code></pre> </div> </div> +<div class="paragraph"> +<p>And conditional lenses that can be defined using a predicate function and +returns a lens that focuses in an element only if it passes the predicate:</p> +</div> +<div class="listingblock"> +<div class="title">Example focusing using conditional lenses</div> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 2</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 3</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 42</span> + +<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => nil</span> + +<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 1</span> + +<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<span class="tok-c1">;; => 1</span></code></pre> +</div> +</div> </div> <div class="sect3"> -<h4 id="traversals"><a class="link" href="#traversals">Traversals</a></h4> +<h4 id="interoperability"><a class="link" href="#interoperability">Interoperability</a></h4> <div class="paragraph"> -<p>A traversal is similar to a lens but it focuses on multiple values instead of one. -Therefore, we use the <code>foci</code> function for viewing the focused elements of a -traversal.</p> +<p>There are also <code>Focus</code> type that allows you to derive atom like objects from +clojure atoms focusing to a specific portion of it using lenses.</p> </div> <div class="paragraph"> -<p>Traversals should be composed with other traversals. You can compose lenses -with a traversal but it will become a traversal and you will have to use <code>foci</code> -for viewing its values.</p> +<p>Let see an example focusing on a concrete set of keys on an asociative +data structure referenced by an atom:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">atom</span> <span class="tok-p">{</span><span class="tok-ss">:x</span> <span class="tok-mi">1</span> <span class="tok-ss">:y</span> <span class="tok-mi">2</span> <span class="tok-ss">:z</span> <span class="tok-mi">3</span><span class="tok-p">}))</span> + +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">state-d</span> + <span class="tok-p">(</span><span class="tok-nf">l/focus-atom</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:x</span> <span class="tok-ss">:y</span><span class="tok-p">])</span> <span class="tok-nv">state</span><span class="tok-p">))</span> + +<span class="tok-o">@</span><span class="tok-nv">state-d</span> +<span class="tok-c1">;; => {:x 1 :y 2}</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>The object returned by <code>focus-atom</code> function behaves identically to a clojure +atom and it can be treated as drop in replacement of it:</p> +</div> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">swap!</span> <span class="tok-nv">state-d</span> <span class="tok-nv">update</span> <span class="tok-ss">:x</span> <span class="tok-nv">inc</span><span class="tok-p">)</span> + +<span class="tok-o">@</span><span class="tok-nv">state</span> +<span class="tok-c1">;; => {:x 2 :y 2 :z 3}</span> + +<span class="tok-o">@</span><span class="tok-nv">state-d</span> +<span class="tok-c1">;; => {:x 2 :y 2}</span></code></pre> +</div> +</div> +<div class="paragraph"> +<p>And do not forget that you also can attach watchers to focused atoms in the same +way as you will do that with clojure(script) atoms.</p> +</div> +</div> +</div> +<div class="sect2"> +<h3 id="traversals"><a class="link" href="#traversals">Traversals</a></h3> +<div class="paragraph"> +<p><strong>Status:</strong> Experimental</p> +</div> +<div class="paragraph"> +<p>A traversal is similar to a lens but it focuses on multiple values instead of one.</p> +</div> +<div class="sect3"> +<h4 id="first-steps-2"><a class="link" href="#first-steps-2">First steps</a></h4> +<div class="paragraph"> +<p>Therefore, we use the <code>foci</code> function for viewing the focused elements of a +traversal.</p> </div> <div class="paragraph"> <p>Let’s look at the identity traversal, it’s called <code>it</code>:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/it</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.traversal</span> <span class="tok-ss">:as</span> <span class="tok-nv">t</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/it</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-c1">;; => (42)</span> -<span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/it</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/it</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => ([0 1 2 3])</span> -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/it</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-nv">t/it</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => 42</span> -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/it</span> <span class="tok-nb">count </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-nv">t/it</span> <span class="tok-nb">count </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => 4</span></code></pre> </div> </div> +</div> +<div class="sect3"> +<h4 id="traversals-composition"><a class="link" href="#traversals-composition">Traversals composition</a></h4> +<div class="paragraph"> +<p>Traversals like lenses are defined in terms of functions so the same approach +also applies to traversals. Them can be composed just using <code>comp</code> or any +other function composition technique.</p> +</div> +<div class="paragraph"> +<p>Traversals should be composed with other traversals. You can compose lenses +with a traversal but it will become a traversal and you will have to use <code>foci</code> +for viewing its values.</p> +</div> +</div> +<div class="sect3"> +<h4 id="builtin-traversals"><a class="link" href="#builtin-traversals">Builtin traversals</a></h4> <div class="paragraph"> <p>The <code>each</code> traversal focuses every value in a collection, allowing us to map preservering structure. The <code>cat</code> traversal flattens a nested collection:</p> </div> <div class="listingblock"> +<div class="title">Example using <code>each</code> traversal</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/each</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/each</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => (0 1 2 3)</span> -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/each</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-nv">t/each</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [1 2 3 4]</span> -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/each</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-nv">t/each</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [42 42 42 42]</span> -<span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-nv">l/cat</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> +<span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/cat</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> <span class="tok-c1">;; => (0 1 2 3 4 5)</span> -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/cat</span> <span class="tok-nb">inc </span><span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> +<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-nv">t/cat</span> <span class="tok-nb">inc </span><span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> <span class="tok-c1">;; => [[1 2 3] [4 5 6]]</span> -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/cat</span> <span class="tok-mi">42</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> +<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-nv">t/cat</span> <span class="tok-mi">42</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> <span class="tok-c1">;; => [[42 42 42] [42 42 42]]</span></code></pre> </div> </div> @@ -2558,17 +2641,18 @@ <h4 id="traversals"><a class="link" href="#traversals">Traversals</a></h4> of another by composition:</p> </div> <div class="listingblock"> +<div class="title">Example using <code>filter</code> traversal</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/each</span> <span class="tok-p">(</span><span class="tok-nf">l/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">t/each</span> <span class="tok-p">(</span><span class="tok-nf">t/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => (1 3 5)</span> -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/each</span> <span class="tok-p">(</span><span class="tok-nf">l/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> +<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">t/each</span> <span class="tok-p">(</span><span class="tok-nf">t/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> <span class="tok-nv">inc</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 2 4 4 6]</span> -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/each</span> <span class="tok-p">(</span><span class="tok-nf">l/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> +<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">t/each</span> <span class="tok-p">(</span><span class="tok-nf">t/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => [42 2 42 4 42]</span></code></pre> @@ -2579,16 +2663,16 @@ <h4 id="traversals"><a class="link" href="#traversals">Traversals</a></h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/foci</span> <span class="tok-p">(</span><span class="tok-nf">l/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-p">(</span><span class="tok-nf">t/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => (1 3 5)</span> -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-p">(</span><span class="tok-nf">t/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> <span class="tok-nv">inc</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 2 4 4 6]</span> -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-p">(</span><span class="tok-nf">t/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => [42 2 42 4 42]</span></code></pre> @@ -2600,52 +2684,35 @@ <h4 id="traversals"><a class="link" href="#traversals">Traversals</a></h4> </div> </div> <div class="sect3"> -<h4 id="interoperability"><a class="link" href="#interoperability">Interoperability</a></h4> +<h4 id="interoperability-2"><a class="link" href="#interoperability-2">Interoperability</a></h4> <div class="paragraph"> -<p><code>cats.labs.lens</code> implement the <code>Focus</code> and <code>Foci</code> atom types, which are derived -atoms with either a lens or a traversal. We can focus on a subpart of the -structure and change it, reflecting the changes on the original atom:</p> +<p>There are also <code>Foci</code> type that allows you to derive atom like objects from +clojure atoms focusing to a specific portion of it using traversals.</p> +</div> +<div class="paragraph"> +<p>Let see an example:</p> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.lens</span> <span class="tok-ss">:as</span> <span class="tok-nv">l</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.traversal</span> <span class="tok-ss">:as</span> <span class="tok-nv">t</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">atom</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">]))</span> -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">fa</span> <span class="tok-p">(</span><span class="tok-nf">l/focus-atom</span> <span class="tok-nv">l/fst</span> <span class="tok-nv">a</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">fsa</span> <span class="tok-p">(</span><span class="tok-nf">l/foci-atom</span> <span class="tok-nv">l/each</span> <span class="tok-nv">a</span><span class="tok-p">))</span> - -<span class="tok-o">@</span><span class="tok-nv">fa</span> -<span class="tok-c1">;; =>1</span> +<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">fsa</span> <span class="tok-p">(</span><span class="tok-nf">t/foci-atom</span> <span class="tok-nv">t/each</span> <span class="tok-nv">a</span><span class="tok-p">))</span> <span class="tok-o">@</span><span class="tok-nv">fsa</span> <span class="tok-c1">;; => (1 2 3 4)</span> -<span class="tok-p">(</span><span class="tok-nf">reset!</span> <span class="tok-nv">fa</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span> - -<span class="tok-o">@</span><span class="tok-nv">fa</span> -<span class="tok-c1">;; => 42</span> - -<span class="tok-o">@</span><span class="tok-nv">fsa</span> -<span class="tok-c1">;; => (42 2 3 4)</span> - -<span class="tok-o">@</span><span class="tok-nv">a</span> -<span class="tok-c1">;; => [42 2 3 4]</span> - <span class="tok-p">(</span><span class="tok-nf">reset!</span> <span class="tok-nv">fsa</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-c1">;; => (42 42 42 42)</span> <span class="tok-o">@</span><span class="tok-nv">a</span> -<span class="tok-c1">;; => [42 42 42 42]</span> - -<span class="tok-o">@</span><span class="tok-nv">fa</span> -<span class="tok-c1">;; => 42</span></code></pre> +<span class="tok-c1">;; => [42 42 42 42]</span></code></pre> </div> </div> <div class="paragraph"> -<p><code>swap!</code> and watches also work on the derived focus or foci atoms.</p> +<p>And do not forget that you also can attach watchers to focused atoms in the same +way as you will do that with clojure(script) atoms.</p> </div> </div> </div> @@ -2662,13 +2729,10 @@ <h2 id="complementary-libraries"><a class="link" href="#complementary-libraries" <div class="ulist"> <ul> <li> -<p>Promise monad (ClojureScript): <a href="https://github.com/funcool/promesa" class="bare">https://github.com/funcool/promesa</a></p> -</li> -<li> -<p>Promise monad (Clojure): <a href="https://github.com/funcool/promissum" class="bare">https://github.com/funcool/promissum</a></p> +<p>Promise monad: <a href="https://github.com/funcool/promesa" class="bare">https://github.com/funcool/promesa</a></p> </li> <li> -<p>Concurrent data fetching: <a href="https://github.com/funcool/muse" class="bare">https://github.com/funcool/muse</a></p> +<p>Concurrent data fetching: <a href="https://github.com/funcool/urania" class="bare">https://github.com/funcool/urania</a></p> </li> </ul> </div> @@ -2812,8 +2876,8 @@ <h3 id="run-tests"><a class="link" href="#run-tests">Run tests</a></h3> <h3 id="license"><a class="link" href="#license">License</a></h3> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2015 Andrey Antukh <niwi@niwi.nz> -Copyright (c) 2014-2015 Alejandro Gómez <alejandro@dialelo.com> +<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2016 Andrey Antukh <niwi@niwi.nz> +Copyright (c) 2014-2016 Alejandro Gómez <alejandro@dialelo.com> All rights reserved. @@ -2845,7 +2909,7 @@ <h3 id="license"><a class="link" href="#license">License</a></h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2015-12-16 00:55:47 EET +Last updated 2016-01-03 11:37:27 CET </div> </div> </body> From 9a0809f2568f2a4cdb7cea56d37509bd159c5886 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Wed, 3 Aug 2016 08:37:47 +0200 Subject: [PATCH 50/52] Generate documentation --- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 22 +- latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 +- latest/api/cats.labs.manifold.html | 2 +- latest/api/cats.labs.promise.html | 2 + latest/api/cats.labs.test.html | 2 +- latest/api/cats.monad.either.html | 4 +- latest/api/cats.monad.exception.html | 2 +- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 6 +- latest/api/cats.protocols.html | 2 +- latest/api/cats.util.html | 2 +- latest/api/index.html | 2 +- latest/index.html | 848 +-------------------------- 16 files changed, 41 insertions(+), 863 deletions(-) create mode 100644 latest/api/cats.labs.promise.html diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index 424815e..2073ac5 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L408">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L389">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L340">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L234">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L446">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L128">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L284">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L465">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L427">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L159">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L501">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L484">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L437">view source</a></div></div><div class="public anchor" id="var-lazy-sequence-context"><h3><a href="#var-lazy-sequence-context">lazy-sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L157">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L335">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L535">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L233">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L383">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L552">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L518">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index 3f57256..9d9c4e9 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-.2Blevel-default.2B"><h3><a href="#var-.2Blevel-default.2B">+level-default+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-.2Blevel-transformer.2B"><h3><a href="#var-.2Blevel-transformer.2B">+level-transformer+</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L32">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L41">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L58">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-context.3F"><h3><a href="#var-context.3F">context?</a></h3><div class="usage"><code>(context? v)</code></div><div class="doc"><div class="markdown"><p>Returnt <code>true</code> if the provided value satisfies the Context protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L38">view source</a></div></div><div class="public anchor" id="var-get-current"><h3><a href="#var-get-current">get-current</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-current & args)</code></div><div class="doc"><div class="markdown"><p>Deprecated alias to <code>infer</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L83">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L45">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L56">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index 3fd9574..b90cd8e 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,8 +1,8 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L729">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L733">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L772">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L787">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L758">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L764">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L750">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p><p>You can think of it as generalizing the <code>some-></code> thread macro to all Monads instead of just Maybe.</p><p>Alternatively, if you think of the regular thread macro as sugar for <code>let</code>:</p><p>(-> :a b (c (other args)) d) => (let [res (b :a) res (c res (other args)) res (d res)] res)</p><p>Then <code>->=</code> is sugar for cats.core/mlet:</p><p>(->= m-a b (c (other args)) d) (mlet [res m-a res (c res (other args)) res (d res)] (return res))</p><p>Note that extra args in this context are assumed pure, and will be evaluated along with the function itself; this also matches the behavior of <code>some-></code> wrt extra args.</p><p>Threading through pure functions is somewhat awkward, but can be done:</p><p>(->= m-a monadic-fn (-> pure-fn other-pure-fn m/return) other-monadic-fn)</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L552">view source</a></div></div><div class="public anchor" id="var--.3E.3E.3D"><h3><a href="#var--.3E.3E.3D">->>=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->>= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like ->>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L597">view source</a></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L872">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L876">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L915">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L930">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L901">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L907">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L893">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L737">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L410">view source</a></div></div><div class="public anchor" id="var-bimap"><h3><a href="#var-bimap">bimap</a></h3><div class="usage"><code>(bimap f g)</code><code>(bimap f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p><p>Given functions <code>f</code> and <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to a first argument or <code>g</code> to a second argument.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L880">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L404">view source</a></div></div><div class="public anchor" id="var-ap"><h3><a href="#var-ap">ap</a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap f & args)</code></div><div class="doc"><div class="markdown"><p>Apply a pure function to applicative arguments, e.g.</p><p>(ap + (just 1) (just 2) (just 3)) ;; => #<Just [6]> (ap str [“hi” “lo”] [“bye” “woah” “hey”]) ;; => [“hibye” “hiwoah” “hihey” “lobye” “lowoah” “lohey”]</p><p><code>ap</code> is essentially sugar for <code>(apply fapply (pure f) args)</code>, but for the common case where you have a pure, uncurried, possibly variadic function.</p><p><code>ap</code> actually desugars in <code>alet</code> form:</p><p>(macroexpand-1 `(ap + (just 1) (just2))) ;; => (alet [a1 (just 1) a2 (just 2)] (+ a1 a2))</p><p>That way, variadic functions Just Work, without needing to specify an arity separately.</p><p>If you’re familiar with Haskell, this is closest to writing “in Applicative style”: you can straightforwardly convert pure function application to effectful application by with some light syntax (<$> and <*> in case of Haskell, and <code>ap</code> here).</p><p>See the original Applicative paper for more inspiration: <a href="http://staff.city.ac.uk/~ross/papers/Applicative.pdf">http://staff.city.ac.uk/~ross/papers/Applicative.pdf</a></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L471">view source</a></div></div><div class="public anchor" id="var-ap-.3E"><h3><a href="#var-ap-.3E">ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap-> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>-></code>, within an applicative idiom.</p><p>Compare:</p><p>(macroexpand-1 `(-> a b c (d e f))) => (d (c (b a) e f)</p><p>with:</p><p>(macroexpand-1 `(ap-> a b c (d e f)) => (ap d (ap c (ap b a) e f))</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L504">view source</a></div></div><div class="public anchor" id="var-ap-.3E.3E"><h3><a href="#var-ap-.3E.3E">ap->></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap->> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>->></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L527">view source</a></div></div><div class="public anchor" id="var-as-.3E.3D"><h3><a href="#var-as-.3E.3D">as->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(as->= expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>as-></code>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L607">view source</a></div></div><div class="public anchor" id="var-as-ap-.3E"><h3><a href="#var-as-ap-.3E">as-ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(as-ap-> expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>as-></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L540">view source</a></div></div><div class="public anchor" id="var-bimap"><h3><a href="#var-bimap">bimap</a></h3><div class="usage"><code>(bimap f g)</code><code>(bimap f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p><p>Given functions <code>f</code> and <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to a first argument or <code>g</code> to a second argument.</p> <pre><code>(bimap dec inc (either/right 1) ;; => #<Right 2> @@ -29,7 +29,7 @@ ((((c+) 1) 2) 3) ;; => 6 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L509">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L492">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L620">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L781">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L186">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L652">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L635">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L763">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L924">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L186">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -38,7 +38,7 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L705">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L796">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L848">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L939">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> <pre><code>(require '[cats.context :as ctx] '[cats.core :as m] '[cats.monad.maybe :as maybe]) @@ -62,7 +62,7 @@ (ctx/with-context maybe/context (foldm m-div 1 [])) ;; => #<Just 1> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L803">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L789">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L946">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L932">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> </code></pre><p>Yet an other example that fails:</p> @@ -72,13 +72,13 @@ (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L685">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left-map"><h3><a href="#var-left-map">left-map</a></h3><div class="usage"><code>(left-map f)</code><code>(left-map f bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the first argument.</p><p>Given a function <code>f</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to the first argument, if present, otherwise leave <code>bv</code> unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L828">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left-map"><h3><a href="#var-left-map">left-map</a></h3><div class="usage"><code>(left-map f)</code><code>(left-map f bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the first argument.</p><p>Given a function <code>f</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to the first argument, if present, otherwise leave <code>bv</code> unchanged.</p> <pre><code>(left-map dec (either/right 1) ;; => #<Right 1> (left-map dec (either/left 1) ;; => #<Left 0> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L152">view source</a></div></div><div class="public anchor" id="var-lift"><h3><a href="#var-lift">lift</a></h3><div class="usage"><code>(lift mv)</code><code>(lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the inner monad of a monad transformer into a value of the monad transformer.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L219">view source</a></div></div><div class="public anchor" id="var-lift-a"><h3><a href="#var-lift-a">lift-a</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-a f)</code><code>(lift-a n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to an applicative context.</p><p>(def app+ (lift-a 2 +))</p><p>(app+ (maybe/just 1) (maybe/just 2)) ;; => <Just 3></p><p>(app+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(app+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L585">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L550">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L152">view source</a></div></div><div class="public anchor" id="var-lift-a"><h3><a href="#var-lift-a">lift-a</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-a f)</code><code>(lift-a n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to an applicative context.</p><p>(def app+ (lift-a 2 +))</p><p>(app+ (maybe/just 1) (maybe/just 2)) ;; => <Just 3></p><p>(app+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(app+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L728">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L693">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> <pre><code>(require '[cats.context :as ctx] '[cats.monad.maybe :as maybe] '[cats.core :as m]) @@ -96,7 +96,7 @@ (ctx/with-context maybe/context (mapseq #(maybe/just (* % 2)) [])) ;; => #<Just [()]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L659">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L802">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) @@ -108,7 +108,7 @@ b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L230">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L224">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> <pre><code>(with-context either/context (pure 1)) ;; => #<Right [1]> @@ -135,7 +135,7 @@ (ctx/with-context maybe/context (m/sequence [])) ;; => #<Just [()]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L629">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L772">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> <pre><code>(defn inc-if-even [n] (if (even? n) @@ -145,4 +145,4 @@ (ctx/with-context maybe/context (m/traverse inc-if-even [2 4])) ;; => #<Just [3 4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L845">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L210">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L199">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L988">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L210">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L199">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index ad57575..7d56129 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L126">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L126">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html index fb3649f..5acbe38 100644 --- a/latest/api/cats.labs.channel.html +++ b/latest/api/cats.labs.channel.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html index a3c75c4..9aee5b5 100644 --- a/latest/api/cats.labs.manifold.html +++ b/latest/api/cats.labs.manifold.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L92">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EDeferredContext"><h3><a href="#var--.3EDeferredContext">->DeferredContext</a></h3><div class="usage"><code>(->DeferredContext timeout timeout-value)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.manifold.DeferredContext.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L101">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L95">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.promise.html b/latest/api/cats.labs.promise.html new file mode 100644 index 0000000..7c8146f --- /dev/null +++ b/latest/api/cats.labs.promise.html @@ -0,0 +1,2 @@ +<!DOCTYPE html> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.promise documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.promise</h2><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="public anchor" id="var-promise-context"><h3><a href="#var-promise-context">promise-context</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Deprecated alias for <code>context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/promise.cljc#L57">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.test.html b/latest/api/cats.labs.test.html index bc3d5e1..5508c76 100644 --- a/latest/api/cats.labs.test.html +++ b/latest/api/cats.labs.test.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.test documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.test</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-applicative-composition"><h3><a href="#var-applicative-composition">applicative-composition</a></h3><div class="usage"><code>(applicative-composition {:keys [ctx gen appf appg eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L143">view source</a></div></div><div class="public anchor" id="var-applicative-homomorphism"><h3><a href="#var-applicative-homomorphism">applicative-homomorphism</a></h3><div class="usage"><code>(applicative-homomorphism {:keys [ctx gen f eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L131">view source</a></div></div><div class="public anchor" id="var-applicative-identity-law"><h3><a href="#var-applicative-identity-law">applicative-identity-law</a></h3><div class="usage"><code>(applicative-identity-law {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L125">view source</a></div></div><div class="public anchor" id="var-applicative-interchange"><h3><a href="#var-applicative-interchange">applicative-interchange</a></h3><div class="usage"><code>(applicative-interchange {:keys [ctx gen appf eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L137">view source</a></div></div><div class="public anchor" id="var-bifunctor-bimap-identity"><h3><a href="#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a></h3><div class="usage"><code>(bifunctor-bimap-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L111">view source</a></div></div><div class="public anchor" id="var-bifunctor-composition"><h3><a href="#var-bifunctor-composition">bifunctor-composition</a></h3><div class="usage"><code>(bifunctor-composition {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L117">view source</a></div></div><div class="public anchor" id="var-bifunctor-first-identity"><h3><a href="#var-bifunctor-first-identity">bifunctor-first-identity</a></h3><div class="usage"><code>(bifunctor-first-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L100">view source</a></div></div><div class="public anchor" id="var-bifunctor-second-identity"><h3><a href="#var-bifunctor-second-identity">bifunctor-second-identity</a></h3><div class="usage"><code>(bifunctor-second-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L105">view source</a></div></div><div class="public anchor" id="var-first-functor-law"><h3><a href="#var-first-functor-law">first-functor-law</a></h3><div class="usage"><code>(first-functor-law {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L86">view source</a></div></div><div class="public anchor" id="var-first-monad-law"><h3><a href="#var-first-monad-law">first-monad-law</a></h3><div class="usage"><code>(first-monad-law {:keys [ctx mf gen eq], :or {gen gen/any, eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L155">view source</a></div></div><div class="public anchor" id="var-gen-context"><h3><a href="#var-gen-context">gen-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L35">view source</a></div></div><div class="public anchor" id="var-monadplus-associativity"><h3><a href="#var-monadplus-associativity">monadplus-associativity</a></h3><div class="usage"><code>(monadplus-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L177">view source</a></div></div><div class="public anchor" id="var-monadzero-bind"><h3><a href="#var-monadzero-bind">monadzero-bind</a></h3><div class="usage"><code>(monadzero-bind {:keys [ctx gen zero eq], :or {zero (m/mzero ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L196">view source</a></div></div><div class="public anchor" id="var-monadzero-identity-element"><h3><a href="#var-monadzero-identity-element">monadzero-identity-element</a></h3><div class="usage"><code>(monadzero-identity-element {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L188">view source</a></div></div><div class="public anchor" id="var-monoid-identity-element"><h3><a href="#var-monoid-identity-element">monoid-identity-element</a></h3><div class="usage"><code>(monoid-identity-element {:keys [ctx gen empty eq], :or {empty (m/mempty ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L76">view source</a></div></div><div class="public anchor" id="var-second-functor-law"><h3><a href="#var-second-functor-law">second-functor-law</a></h3><div class="usage"><code>(second-functor-law {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L92">view source</a></div></div><div class="public anchor" id="var-second-monad-law"><h3><a href="#var-second-monad-law">second-monad-law</a></h3><div class="usage"><code>(second-monad-law {:keys [ctx eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L161">view source</a></div></div><div class="public anchor" id="var-semigroup-associativity"><h3><a href="#var-semigroup-associativity">semigroup-associativity</a></h3><div class="usage"><code>(semigroup-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L65">view source</a></div></div><div class="public anchor" id="var-third-monad-law"><h3><a href="#var-third-monad-law">third-monad-law</a></h3><div class="usage"><code>(third-monad-law {:keys [ctx f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L168">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.test documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3 current"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.test</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-applicative-composition"><h3><a href="#var-applicative-composition">applicative-composition</a></h3><div class="usage"><code>(applicative-composition {:keys [ctx gen appf appg eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L141">view source</a></div></div><div class="public anchor" id="var-applicative-homomorphism"><h3><a href="#var-applicative-homomorphism">applicative-homomorphism</a></h3><div class="usage"><code>(applicative-homomorphism {:keys [ctx gen f eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L129">view source</a></div></div><div class="public anchor" id="var-applicative-identity-law"><h3><a href="#var-applicative-identity-law">applicative-identity-law</a></h3><div class="usage"><code>(applicative-identity-law {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L123">view source</a></div></div><div class="public anchor" id="var-applicative-interchange"><h3><a href="#var-applicative-interchange">applicative-interchange</a></h3><div class="usage"><code>(applicative-interchange {:keys [ctx gen appf eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L135">view source</a></div></div><div class="public anchor" id="var-bifunctor-bimap-identity"><h3><a href="#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a></h3><div class="usage"><code>(bifunctor-bimap-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L109">view source</a></div></div><div class="public anchor" id="var-bifunctor-composition"><h3><a href="#var-bifunctor-composition">bifunctor-composition</a></h3><div class="usage"><code>(bifunctor-composition {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L115">view source</a></div></div><div class="public anchor" id="var-bifunctor-first-identity"><h3><a href="#var-bifunctor-first-identity">bifunctor-first-identity</a></h3><div class="usage"><code>(bifunctor-first-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L98">view source</a></div></div><div class="public anchor" id="var-bifunctor-second-identity"><h3><a href="#var-bifunctor-second-identity">bifunctor-second-identity</a></h3><div class="usage"><code>(bifunctor-second-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L103">view source</a></div></div><div class="public anchor" id="var-first-functor-law"><h3><a href="#var-first-functor-law">first-functor-law</a></h3><div class="usage"><code>(first-functor-law {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L84">view source</a></div></div><div class="public anchor" id="var-first-monad-law"><h3><a href="#var-first-monad-law">first-monad-law</a></h3><div class="usage"><code>(first-monad-law {:keys [ctx mf gen eq], :or {gen gen/any, eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L153">view source</a></div></div><div class="public anchor" id="var-gen-context"><h3><a href="#var-gen-context">gen-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L35">view source</a></div></div><div class="public anchor" id="var-monadplus-associativity"><h3><a href="#var-monadplus-associativity">monadplus-associativity</a></h3><div class="usage"><code>(monadplus-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L175">view source</a></div></div><div class="public anchor" id="var-monadzero-bind"><h3><a href="#var-monadzero-bind">monadzero-bind</a></h3><div class="usage"><code>(monadzero-bind {:keys [ctx gen zero eq], :or {zero (m/mzero ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L192">view source</a></div></div><div class="public anchor" id="var-monadzero-identity-element"><h3><a href="#var-monadzero-identity-element">monadzero-identity-element</a></h3><div class="usage"><code>(monadzero-identity-element {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L184">view source</a></div></div><div class="public anchor" id="var-monoid-identity-element"><h3><a href="#var-monoid-identity-element">monoid-identity-element</a></h3><div class="usage"><code>(monoid-identity-element {:keys [ctx gen empty eq], :or {empty (m/mempty ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L74">view source</a></div></div><div class="public anchor" id="var-second-functor-law"><h3><a href="#var-second-functor-law">second-functor-law</a></h3><div class="usage"><code>(second-functor-law {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L90">view source</a></div></div><div class="public anchor" id="var-second-monad-law"><h3><a href="#var-second-monad-law">second-monad-law</a></h3><div class="usage"><code>(second-monad-law {:keys [ctx eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L159">view source</a></div></div><div class="public anchor" id="var-semigroup-associativity"><h3><a href="#var-semigroup-associativity">semigroup-associativity</a></h3><div class="usage"><code>(semigroup-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L63">view source</a></div></div><div class="public anchor" id="var-third-monad-law"><h3><a href="#var-third-monad-law">third-monad-law</a></h3><div class="usage"><code>(third-monad-law {:keys [ctx f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L166">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index 4f7c1bf..37efa5e 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) @@ -7,4 +7,4 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L267">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L279">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L287">view source</a></div></div><div class="public anchor" id="var-either"><h3><a href="#var-either">either</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L277">view source</a></div></div><div class="public anchor" id="var-either-t"><h3><a href="#var-either-t">either-t</a></h3><div class="usage"><code>(either-t inner)</code></div><div class="doc"><div class="markdown"><p>The Either transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L224">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L138">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L305">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L309">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L313">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L126">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L297">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L121">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L132">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L301">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L226">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L238">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L246">view source</a></div></div><div class="public anchor" id="var-either"><h3><a href="#var-either">either</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L236">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L136">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L264">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L268">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L272">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L114">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L124">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L256">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L119">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L130">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L260">view source</a></div></div><div class="public anchor" id="var-try-either"><h3><a href="#var-try-either">try-either</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-either & body)</code></div><div class="doc"><div class="markdown"><p>Try to evalute the body and return the result as an either. If an exception is thrown return the exception as a left, otherwise return the result as a right.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L281">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index db56b44..201e9d4 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L192">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L64">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L70">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L244">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L251">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L198">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L66">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L72">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L263">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L268">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 9cfd4a4..75610c7 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L73">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L71">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index b7ee93c..c46e793 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,10 +1,10 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]> -</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L337">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> +</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L283">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> <pre><code>(from-maybe (just 1)) ;=> 1 @@ -13,4 +13,4 @@ (from-maybe (nothing) 42) ;=> 42 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L140">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just)</code><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p><p>Without arguments it returns a Just instance with nil as wrapped value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L113">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L126">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L343">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L304">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L322">view source</a></div></div><div class="public anchor" id="var-maybe-t"><h3><a href="#var-maybe-t">maybe-t</a></h3><div class="usage"><code>(maybe-t inner)</code></div><div class="doc"><div class="markdown"><p>The maybe transformer constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L251">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L105">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L121">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L132">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L314">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L141">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L116">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L127">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L289">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L250">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L268">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L103">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L122">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L133">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L260">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index 0712284..e91f33f 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context monadic value ctx and any value v, and puts the value v in the most minimal context of same type of ctx</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L70">view source</a></div></div><div class="public anchor" id="var-Bifunctor"><h3><a href="#var-Bifunctor">Bifunctor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A ‘Functor’ of two arguments.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--bimap"><h3><a href="#var--bimap">-bimap</a></h3><div class="usage"><code>(-bimap btor f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L66">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-level"><h3><a href="#var--get-level">-get-level</a></h3><div class="usage"><code>(-get-level _)</code></div><div class="doc"><div class="markdown"><p>Get a context priority level.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example es Maybe monad type Just. It implements this abstraction for establish that Just is part of Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L36">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class responsible of extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L57">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L79">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L62">view source</a></div></div><div class="public anchor" id="var-JoinSemiLattice"><h3><a href="#var-JoinSemiLattice">JoinSemiLattice</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A algebraic structure with element joins.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--join"><h3><a href="#var--join">-join</a></h3><div class="usage"><code>(-join _ other)</code></div><div class="doc"><div class="markdown"><p>Converge two data structures.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L112">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L91">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L101">view source</a></div></div><div class="public anchor" id="var-MonadTrans"><h3><a href="#var-MonadTrans">MonadTrans</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A monad transformer abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--lift"><h3><a href="#var--lift">-lift</a></h3><div class="usage"><code>(-lift m mv)</code></div><div class="doc"><div class="markdown"><p>Lift a value from the parameterized monad to the transformer.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L106">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L96">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element for is associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L53">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Just an abstraction for make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L44">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L49">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L84">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context or monadic value <code>app</code> and any value <code>v</code>, and puts the value <code>v</code> in the most minimal context (normally <code>mempty</code>) of same type of <code>app</code></p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L69">view source</a></div></div><div class="public anchor" id="var-Bifunctor"><h3><a href="#var-Bifunctor">Bifunctor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A ‘Functor’ of two arguments.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--bimap"><h3><a href="#var--bimap">-bimap</a></h3><div class="usage"><code>(-bimap btor f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L65">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example is the Maybe monad type Just. It implements this abstraction to establish that Just is part of the Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L35">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class to extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L56">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L78">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L90">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L100">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L95">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element with respect to an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>An abstraction to make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L43">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.util.html b/latest/api/cats.util.html index 1f90fda..e0f3a98 100644 --- a/latest/api/cats.util.html +++ b/latest/api/cats.util.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index ea0584a..31fd6b4 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 1.2.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 1.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>applicative</span></div></div></li><li class="depth-3"><a href="cats.applicative.validation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validation</span></div></a></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.continuation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>continuation</span></div></a></li><li class="depth-3"><a href="cats.labs.crdt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crdt</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gcounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.gset.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gset</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.pncounter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pncounter</span></div></a></li><li class="depth-4 branch"><a href="cats.labs.crdt.protocols.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-4"><a href="cats.labs.crdt.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.lens.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>lens</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.sugar.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sugar</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-3"><a href="cats.labs.writer.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>writer</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -486px;"><span class="top" style="height: 495px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.applicative.validation.html">cats.applicative.validation</a></h3><div class="doc"><div class="markdown"><p>The Validation applicative implementation and helper functions for validating values. Isomorphic to Either.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.applicative.validation.html#var-branch">branch</a> </li><li> <a href="cats.applicative.validation.html#var-branch-fail">branch-fail</a> </li><li> <a href="cats.applicative.validation.html#var-branch-ok">branch-ok</a> </li><li> <a href="cats.applicative.validation.html#var-either-.3Evalidation">either->validation</a> </li><li> <a href="cats.applicative.validation.html#var-fail">fail</a> </li><li> <a href="cats.applicative.validation.html#var-fail.3F">fail?</a> </li><li> <a href="cats.applicative.validation.html#var-ok">ok</a> </li><li> <a href="cats.applicative.validation.html#var-ok.3F">ok?</a> </li><li> <a href="cats.applicative.validation.html#var-validation">validation</a> </li><li> <a href="cats.applicative.validation.html#var-validation-.3Eeither">validation->either</a> </li><li> <a href="cats.applicative.validation.html#var-validation.3F">validation?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-.2Blevel-default.2B">+level-default+</a> </li><li> <a href="cats.context.html#var-.2Blevel-transformer.2B">+level-transformer+</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-bimap">bimap</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-left-map">left-map</a> </li><li> <a href="cats.core.html#var-lift">lift</a> </li><li> <a href="cats.core.html#var-lift-a">lift-a</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-right-map">right-map</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.continuation.html">cats.labs.continuation</a></h3><div class="doc"><div class="markdown"><p>The Continuation Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.continuation.html#var-call-cc">call-cc</a> </li><li> <a href="cats.labs.continuation.html#var-context">context</a> </li><li> <a href="cats.labs.continuation.html#var-continuation">continuation</a> </li><li> <a href="cats.labs.continuation.html#var-run-cont">run-cont</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.html">cats.labs.crdt</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.html#var--decode">-decode</a> </li><li> <a href="cats.labs.crdt.html#var--encode">-encode</a> </li><li> <a href="cats.labs.crdt.html#var--load">-load</a> </li><li> <a href="cats.labs.crdt.html#var-dec">dec</a> </li><li> <a href="cats.labs.crdt.html#var-decode">decode</a> </li><li> <a href="cats.labs.crdt.html#var-encode">encode</a> </li><li> <a href="cats.labs.crdt.html#var-inc">inc</a> </li><li> <a href="cats.labs.crdt.html#var-inc-by">inc-by</a> </li><li> <a href="cats.labs.crdt.html#var-ISerializable">ISerializable</a> </li><li> <a href="cats.labs.crdt.html#var-merge">merge</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gcounter.html">cats.labs.crdt.gcounter</a></h3><div class="doc"><div class="markdown"><p>A G-Counter is a grow-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current actor.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gcounter.html#var--.3EGCounter">->GCounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter">gcounter</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter*">gcounter*</a> </li><li> <a href="cats.labs.crdt.gcounter.html#var-gcounter.3F">gcounter?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.gset.html">cats.labs.crdt.gset</a></h3><div class="doc"><div class="markdown"><p>Set union is commutative and convergent; hence it is always safe to have simultaneous writes to a set which only allows addition. You cannot remove an element of a G-Set.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.gset.html#var--.3EGSet">->GSet</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset">gset</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset*">gset*</a> </li><li> <a href="cats.labs.crdt.gset.html#var-gset.3F">gset?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.pncounter.html">cats.labs.crdt.pncounter</a></h3><div class="doc"><div class="markdown"><p>PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as internal G-Counters.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.pncounter.html#var--.3EPNCounter">->PNCounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter">pncounter</a> </li><li> <a href="cats.labs.crdt.pncounter.html#var-pncounter*">pncounter*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.protocols.html">cats.labs.crdt.protocols</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.protocols.html#var-*node*">*node*</a> </li><li> <a href="cats.labs.crdt.protocols.html#var-ICounter">ICounter</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.crdt.util.html">cats.labs.crdt.util</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.crdt.util.html#var-hostname">hostname</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.lens.html">cats.labs.lens</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.lens.html#var--.3EFoci">->Foci</a> </li><li> <a href="cats.labs.lens.html#var--.3EFocus">->Focus</a> </li><li> <a href="cats.labs.lens.html#var-both">both</a> </li><li> <a href="cats.labs.lens.html#var-cat">cat</a> </li><li> <a href="cats.labs.lens.html#var-const-setter">const-setter</a> </li><li> <a href="cats.labs.lens.html#var-each">each</a> </li><li> <a href="cats.labs.lens.html#var-ffoci">ffoci</a> </li><li> <a href="cats.labs.lens.html#var-filter">filter</a> </li><li> <a href="cats.labs.lens.html#var-foci">foci</a> </li><li> <a href="cats.labs.lens.html#var-foci-atom">foci-atom</a> </li><li> <a href="cats.labs.lens.html#var-focus">focus</a> </li><li> <a href="cats.labs.lens.html#var-focus-atom">focus-atom</a> </li><li> <a href="cats.labs.lens.html#var-fst">fst</a> </li><li> <a href="cats.labs.lens.html#var-id">id</a> </li><li> <a href="cats.labs.lens.html#var-id-setter">id-setter</a> </li><li> <a href="cats.labs.lens.html#var-in">in</a> </li><li> <a href="cats.labs.lens.html#var-indexed">indexed</a> </li><li> <a href="cats.labs.lens.html#var-it">it</a> </li><li> <a href="cats.labs.lens.html#var-key">key</a> </li><li> <a href="cats.labs.lens.html#var-keys">keys</a> </li><li> <a href="cats.labs.lens.html#var-lens">lens</a> </li><li> <a href="cats.labs.lens.html#var-lens-.3Etraversal">lens->traversal</a> </li><li> <a href="cats.labs.lens.html#var-nothing">nothing</a> </li><li> <a href="cats.labs.lens.html#var-nth">nth</a> </li><li> <a href="cats.labs.lens.html#var-only">only</a> </li><li> <a href="cats.labs.lens.html#var-over">over</a> </li><li> <a href="cats.labs.lens.html#var-passes">passes</a> </li><li> <a href="cats.labs.lens.html#var-put">put</a> </li><li> <a href="cats.labs.lens.html#var-select-keys">select-keys</a> </li><li> <a href="cats.labs.lens.html#var-snd">snd</a> </li><li> <a href="cats.labs.lens.html#var-tail">tail</a> </li><li> <a href="cats.labs.lens.html#var-traversal">traversal</a> </li><li> <a href="cats.labs.lens.html#var-units">units</a> </li><li> <a href="cats.labs.lens.html#var-vals">vals</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.reader.html">cats.labs.reader</a></h3><div class="doc"><div class="markdown"><p>The Reader Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.reader.html#var-ask">ask</a> </li><li> <a href="cats.labs.reader.html#var-local">local</a> </li><li> <a href="cats.labs.reader.html#var-MonadReader">MonadReader</a> </li><li> <a href="cats.labs.reader.html#var-reader">reader</a> </li><li> <a href="cats.labs.reader.html#var-reader-t">reader-t</a> </li><li> <a href="cats.labs.reader.html#var-reader.3F">reader?</a> </li><li> <a href="cats.labs.reader.html#var-run-reader">run-reader</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.state.html">cats.labs.state</a></h3><div class="doc"><div class="markdown"><p>The State Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.state.html#var-eval-state">eval-state</a> </li><li> <a href="cats.labs.state.html#var-exec-state">exec-state</a> </li><li> <a href="cats.labs.state.html#var-get-state">get-state</a> </li><li> <a href="cats.labs.state.html#var-MonadState">MonadState</a> </li><li> <a href="cats.labs.state.html#var-put-state">put-state</a> </li><li> <a href="cats.labs.state.html#var-run-state">run-state</a> </li><li> <a href="cats.labs.state.html#var-state">state</a> </li><li> <a href="cats.labs.state.html#var-state-t">state-t</a> </li><li> <a href="cats.labs.state.html#var-state.3F">state?</a> </li><li> <a href="cats.labs.state.html#var-swap-state">swap-state</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.sugar.html">cats.labs.sugar</a></h3><div class="doc"><div class="markdown"><p>Experimental syntax sugar for core abstractions. Sugar that proves its worthiness will graduate to the cats.core namespace.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.sugar.html#var--.3E.3D">->=</a> </li><li> <a href="cats.labs.sugar.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.labs.sugar.html#var-ap">ap</a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.labs.sugar.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.labs.sugar.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.labs.sugar.html#var-as-ap-.3E">as-ap-></a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.test.html">cats.labs.test</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.test.html#var-applicative-composition">applicative-composition</a> </li><li> <a href="cats.labs.test.html#var-applicative-homomorphism">applicative-homomorphism</a> </li><li> <a href="cats.labs.test.html#var-applicative-identity-law">applicative-identity-law</a> </li><li> <a href="cats.labs.test.html#var-applicative-interchange">applicative-interchange</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-composition">bifunctor-composition</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-first-identity">bifunctor-first-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-second-identity">bifunctor-second-identity</a> </li><li> <a href="cats.labs.test.html#var-first-functor-law">first-functor-law</a> </li><li> <a href="cats.labs.test.html#var-first-monad-law">first-monad-law</a> </li><li> <a href="cats.labs.test.html#var-gen-context">gen-context</a> </li><li> <a href="cats.labs.test.html#var-monadplus-associativity">monadplus-associativity</a> </li><li> <a href="cats.labs.test.html#var-monadzero-bind">monadzero-bind</a> </li><li> <a href="cats.labs.test.html#var-monadzero-identity-element">monadzero-identity-element</a> </li><li> <a href="cats.labs.test.html#var-monoid-identity-element">monoid-identity-element</a> </li><li> <a href="cats.labs.test.html#var-second-functor-law">second-functor-law</a> </li><li> <a href="cats.labs.test.html#var-second-monad-law">second-monad-law</a> </li><li> <a href="cats.labs.test.html#var-semigroup-associativity">semigroup-associativity</a> </li><li> <a href="cats.labs.test.html#var-third-monad-law">third-monad-law</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.writer.html">cats.labs.writer</a></h3><div class="doc"><div class="markdown"><p>The Writer Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.writer.html#var-listen">listen</a> </li><li> <a href="cats.labs.writer.html#var-log">log</a> </li><li> <a href="cats.labs.writer.html#var-MonadWriter">MonadWriter</a> </li><li> <a href="cats.labs.writer.html#var-pass">pass</a> </li><li> <a href="cats.labs.writer.html#var-tell">tell</a> </li><li> <a href="cats.labs.writer.html#var-value">value</a> </li><li> <a href="cats.labs.writer.html#var-writer">writer</a> </li><li> <a href="cats.labs.writer.html#var-writer-t">writer-t</a> </li><li> <a href="cats.labs.writer.html#var-writer.3F">writer?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either">either</a> </li><li> <a href="cats.monad.either.html#var-either-t">either-t</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-t">maybe-t</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Bifunctor">Bifunctor</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-JoinSemiLattice">JoinSemiLattice</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadTrans">MonadTrans</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 2.0.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-lazy-sequence-context">lazy-sequence-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-context.3F">context?</a> </li><li> <a href="cats.context.html#var-get-current">get-current</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var--.3E.3D">->=</a> </li><li> <a href="cats.core.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-ap">ap</a> </li><li> <a href="cats.core.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.core.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.core.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.core.html#var-as-ap-.3E">as-ap-></a> </li><li> <a href="cats.core.html#var-bimap">bimap</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-left-map">left-map</a> </li><li> <a href="cats.core.html#var-lift-a">lift-a</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-right-map">right-map</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var--.3EDeferredContext">->DeferredContext</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.promise.html">cats.labs.promise</a></h3><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.promise.html#var-promise-context">promise-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.test.html">cats.labs.test</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.test.html#var-applicative-composition">applicative-composition</a> </li><li> <a href="cats.labs.test.html#var-applicative-homomorphism">applicative-homomorphism</a> </li><li> <a href="cats.labs.test.html#var-applicative-identity-law">applicative-identity-law</a> </li><li> <a href="cats.labs.test.html#var-applicative-interchange">applicative-interchange</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-composition">bifunctor-composition</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-first-identity">bifunctor-first-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-second-identity">bifunctor-second-identity</a> </li><li> <a href="cats.labs.test.html#var-first-functor-law">first-functor-law</a> </li><li> <a href="cats.labs.test.html#var-first-monad-law">first-monad-law</a> </li><li> <a href="cats.labs.test.html#var-gen-context">gen-context</a> </li><li> <a href="cats.labs.test.html#var-monadplus-associativity">monadplus-associativity</a> </li><li> <a href="cats.labs.test.html#var-monadzero-bind">monadzero-bind</a> </li><li> <a href="cats.labs.test.html#var-monadzero-identity-element">monadzero-identity-element</a> </li><li> <a href="cats.labs.test.html#var-monoid-identity-element">monoid-identity-element</a> </li><li> <a href="cats.labs.test.html#var-second-functor-law">second-functor-law</a> </li><li> <a href="cats.labs.test.html#var-second-monad-law">second-monad-law</a> </li><li> <a href="cats.labs.test.html#var-semigroup-associativity">semigroup-associativity</a> </li><li> <a href="cats.labs.test.html#var-third-monad-law">third-monad-law</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either">either</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li><li> <a href="cats.monad.either.html#var-try-either">try-either</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Bifunctor">Bifunctor</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index e83a560..56a87e4 100644 --- a/latest/index.html +++ b/latest/index.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.3"> +<meta name="generator" content="Asciidoctor 1.5.4"> <meta name="author" content="Andrey Antukh & Alejandro Gómez"> <title>Cats Documentation</title> <style> @@ -80,14 +80,13 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">1.2.1</span> +<span id="revdate">2.0.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> <ul class="sectlevel1"> <li><a href="#introduction">Introduction</a></li> <li><a href="#rationale">Rationale</a></li> -<li><a href="#project-maturity">Project Maturity</a></li> <li><a href="#install">Install</a></li> <li><a href="#user-guide">User Guide</a> <ul class="sectlevel2"> @@ -100,7 +99,6 @@ <h1>Cats Documentation</h1> <li><a href="#monad">Monad</a></li> <li><a href="#monadzero">MonadZero</a></li> <li><a href="#monadplus">MonadPlus</a></li> -<li><a href="#monad-transformers">Monad Transformers</a></li> </ul> </li> <li><a href="#types">Types</a> @@ -108,7 +106,6 @@ <h1>Cats Documentation</h1> <li><a href="#maybe">Maybe</a></li> <li><a href="#either">Either</a></li> <li><a href="#exception">Exception</a></li> -<li><a href="#validation">Validation</a></li> <li><a href="#built-in-types">Built in types</a></li> </ul> </li> @@ -129,12 +126,6 @@ <h1>Cats Documentation</h1> <li><a href="#test-check">test.check</a></li> <li><a href="#channel">Channel</a></li> <li><a href="#manifold-deferred">Manifold Deferred</a></li> -<li><a href="#state">State</a></li> -<li><a href="#reader">Reader</a></li> -<li><a href="#writer">Writer</a></li> -<li><a href="#continuation">Continuation</a></li> -<li><a href="#lens">Lens</a></li> -<li><a href="#traversals">Traversals</a></li> </ul> </li> <li><a href="#complementary-libraries">Complementary libraries</a></li> @@ -185,7 +176,7 @@ <h2 id="rationale"><a class="link" href="#rationale">Rationale</a></h2> </li> <li> <p>We do not intend to write a little Haskell inside Clojure. We have adopted a -practical and Clojure like approach, always with correctness in mind.</p> +practical and Clojure like pragmatic approach, always with correctness in mind.</p> </li> <li> <p>We do not like viral/copyleft like licenses and in contrast to other libraries @@ -197,42 +188,6 @@ <h2 id="rationale"><a class="link" href="#rationale">Rationale</a></h2> </li> </ul> </div> -<div class="paragraph"> -<p><strong>Alternatives:</strong></p> -</div> -<div class="ulist"> -<ul> -<li> -<p><strong>algo.monads</strong>: This is the official Clojure library for monads. Its approach -for modeling monads is slightly limited, only supports the monad abstraction and -does not have support for ClojureScript.</p> -</li> -<li> -<p><strong>fluokitten</strong>: Slightly unmaintaned by the original author. It is focused on -being very practical without taking care of correctness (for example, it extends -Clojure types with monadic abstractions that do not make sense). It has no -support for ClojureScript either.</p> -</li> -<li> -<p><strong>monads</strong>: Is the most advanced monads library, supports also functors, -applicatives and other related abstractions. It lacks a good and readable -documentation, focus on correctness, has Haskell like sugar syntax (instead of -Clojure like syntax) and does not have support for ClojureScript.</p> -</li> -</ul> -</div> -<div class="paragraph"> -<p>All listed alternatives are licensed with EPL or similar licenses.</p> -</div> -</div> -</div> -<div class="sect1"> -<h2 id="project-maturity"><a class="link" href="#project-maturity">Project Maturity</a></h2> -<div class="sectionbody"> -<div class="paragraph"> -<p><em>cats</em> already reached the 1.0.0 version and the <a href="api/index.html#id">API</a> is - settled.</p> -</div> </div> </div> <div class="sect1"> @@ -244,12 +199,12 @@ <h2 id="install"><a class="link" href="#install">Install</a></h2> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"1.2.1"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"2.0.0"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> -<p>And it works with the following platforms: <strong>jdk7</strong>, <strong>jdk8</strong>, <strong>node</strong> (0.12.7, 4.2.0, -5.0.0).</p> +<p>And it works with the following platforms: <strong>jdk7</strong>, <strong>jdk8</strong>, <strong>node</strong> +(4.2.0, 5.10.1 and 6.2.0).</p> </div> </div> </div> @@ -696,52 +651,6 @@ <h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> <span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> -<div class="paragraph"> -<p>Maybe is not that much of an interesting applicative, let’s see an example of -using the Validation applicative to validate a vector of values aggregating -the results, be them success or failure.</p> -</div> -<div class="paragraph"> -<p>First we will define a validation function that, given a number, will succed if -it’s even. If it’s odd, it will fail and record the failure in the map monoid -from value to the error type (<code>:not-even</code>).</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">valid-if-even</span> - <span class="tok-p">[</span><span class="tok-nv">n</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nf">even?</span> <span class="tok-nv">n</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-nv">n</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-nv">n</span> <span class="tok-ss">:not-even</span><span class="tok-p">})))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Now let’s try it with some vectors to see how failures are aggregated:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.context</span> <span class="tok-ss">:as</span> <span class="tok-nv">ctx</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> - <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[]))</span> -<span class="tok-c1">;; => #<Ok []></span> - -<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> - <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[</span><span class="tok-mi">2</span> <span class="tok-mi">4</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => #<Ok [2 4]></span> - -<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> - <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => #<Fail {1 :not-even}></span> - -<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">v/context</span> - <span class="tok-p">(</span><span class="tok-nf">m/traverse</span> <span class="tok-nv">valid-if-even</span> <span class="tok-p">[</span><span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]))</span> -<span class="tok-c1">;; => #<Fail {3 :not-even, 5 :not-even}></span></code></pre> -</div> -</div> </div> <div class="sect2"> <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> @@ -934,87 +843,6 @@ <h3 id="monadplus"><a class="link" href="#monadplus">MonadPlus</a></h3> </div> </div> </div> -<div class="sect2"> -<h3 id="monad-transformers"><a class="link" href="#monad-transformers">Monad Transformers</a></h3> -<div class="sect3"> -<h4 id="motivation"><a class="link" href="#motivation">Motivation</a></h4> -<div class="paragraph"> -<p>We can combine two functors and get a new one automatically. Given any two -functors <em>a</em> and <em>b</em>, we can implement a generic <code>fmap</code> for the type <em>a (b Any)</em>, -we’ll call it fmap2:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">functor.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">fmap</span><span class="tok-p">]]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]]))</span> - -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">fmap2</span> - <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">(</span><span class="tok-nb">partial </span><span class="tok-nv">fmap</span> <span class="tok-nv">f</span><span class="tok-p">)</span> <span class="tok-nv">fv</span><span class="tok-p">))</span> - -<span class="tok-c1">; Here, 'a' is [] and 'b' is Maybe, so the type of the</span> -<span class="tok-c1">; combined functor is a vector of Maybe values that could</span> -<span class="tok-c1">; contain a value of any type.</span> -<span class="tok-p">(</span><span class="tok-nf">fmap2</span> <span class="tok-nb">inc </span><span class="tok-p">[(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)])</span> -<span class="tok-c1">;; => [#<Just 2> #<Just 3>]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>However, monads don’t compose as nicely as functors do. We have to actually -implement the composition ourselves.</p> -</div> -<div class="paragraph"> -<p>In some circumstances we would like combine the effects of two monads into -another one. We call the resulting monad a monad transformer, which is the -composition of a "base" and "inner" monad. A monad transformer is itself a monad.</p> -</div> -</div> -<div class="sect3"> -<h4 id="using-monad-transformers"><a class="link" href="#using-monad-transformers">Using monad transformers</a></h4> -<div class="paragraph"> -<p>Let’s combine the effects of two monads: State and Maybe. We’ll create the -transformer using State as the base monad since we want the resulting type to -be a stateful computation that may fail: <code>s → Maybe (a, s)</code>.</p> -</div> -<div class="paragraph"> -<p>Almost every monad implemented in <em>cats</em> has a monad transformer for combining -it with any other monad. The transformer functions take a Monad as their -argument and they return a reified MonadTrans:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">ns </span><span class="tok-nv">transformers.example</span> - <span class="tok-p">(</span><span class="tok-ss">:require</span> <span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.context</span> <span class="tok-ss">:as</span> <span class="tok-nv">ctx</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-nv">cats.labs.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">state</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/state-transformer</span> <span class="tok-nv">maybe/context</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe-state</span> - <span class="tok-p">(</span><span class="tok-nf">state/run-state</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">{}))</span> -<span class="tok-c1">;; => #<Just #<Pair [42 {}]>></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>As we can see in the example below, the return of the <code>maybe-state</code> monad creates -a stateful function that yields a Maybe containing a pair (value, next state).</p> -</div> -<div class="paragraph"> -<p>You probably noticed that we had to wrap the state function invocation with -<code>cats.context/with-context</code>. When working with monad transformers, we have to -be explicit about what monad we are using to implement the binding policy since -there is no way to distinguish values from a transformer type from those of -a regular monad.</p> -</div> -<div class="paragraph"> -<p>The <code>maybe-state</code> monad combines the semantics of both State and Maybe.</p> -</div> -</div> -</div> </div> </div> <div class="sect1"> @@ -1237,48 +1065,6 @@ <h3 id="exception"><a class="link" href="#exception">Exception</a></h3> </div> </div> <div class="sect2"> -<h3 id="validation"><a class="link" href="#validation">Validation</a></h3> -<div class="paragraph"> -<p>The validation type is similar to the Either or Exception types except that it -doesn’t implement a Monad instance. It has two constructors: <code>ok</code> and <code>fail</code>, -representing success and failure respectively.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => #<Ok 42></span> - -<span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">[])</span> -<span class="tok-c1">;; => #<Fail []></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>It implements the Applicative protocol, and its intended usage is as an -Applicative. Applying Validation values together errs on the side of the failure, -and applying failures together aggregates their values using the Semigroup’s -<code>mappend</code> function.</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.applicative.validation</span> <span class="tok-ss">:as</span> <span class="tok-nv">v</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/fapply</span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-s">"OH NOES"</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Fail "OH NOES"></span> - -<span class="tok-c1">;; Note that `<*>` is a variadic fapply</span> -<span class="tok-p">(</span><span class="tok-nf">m/<*></span> <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">42</span><span class="tok-p">)</span> - <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:foo</span> <span class="tok-s">"bar"</span><span class="tok-p">})</span> - <span class="tok-p">(</span><span class="tok-nf">v/fail</span> <span class="tok-p">{</span><span class="tok-ss">:baz</span> <span class="tok-s">"fubar"</span><span class="tok-p">})</span> - <span class="tok-p">(</span><span class="tok-nf">v/ok</span> <span class="tok-mi">99</span><span class="tok-p">))</span> -<span class="tok-c1">;; => #<Fail {:baz "fubar", :foo "bar"}></span></code></pre> -</div> -</div> -</div> -<div class="sect2"> <h3 id="built-in-types"><a class="link" href="#built-in-types">Built in types</a></h3> <div class="paragraph"> <p>Some of the abstractions in <em>cats</em> are implemented for built-in types but you @@ -1428,7 +1214,7 @@ <h4 id="map"><a class="link" href="#map">Map</a></h4> <h2 id="syntax-sugar"><a class="link" href="#syntax-sugar">Syntax sugar</a></h2> <div class="sectionbody"> <div class="paragraph"> -<p>Additionally to the abstractions and types, <strong>cats</strong> exposes some powerfull +<p>Additionally to the abstractions and types, <strong>cats</strong> exposes some powerful syntax abstractions that surelly will make the usage of that abstractions in a more familiar way.</p> </div> @@ -1598,6 +1384,7 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> <div class="listingblock"> <div class="content"> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.promise</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">promesa.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">p</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">sleep-promise</span> @@ -1892,7 +1679,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.2.374"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.2.385"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -1931,7 +1718,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> <span class="tok-c1">;; ---> sending request 100</span> <span class="tok-c1">;; <--- receiving request 100</span> <span class="tok-c1">;; "Elapsed time: 202.236804 msecs"</span> -<span class="tok-c1">;; => 200</span></code></pre> +<span class="tok-c1">;; => 300</span></code></pre> </div> </div> <div class="paragraph"> @@ -1996,7 +1783,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </ul> </div> <div class="paragraph"> -<p>The alet is a powerfull macro that analyzes the dependencies between bindings +<p>The alet is a powerful macro that analyzes the dependencies between bindings and executes the expressions in batches resultin in a very atractive feature for asynchronous calls.</p> </div> @@ -2110,622 +1897,11 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De </div> </div> </div> -<div class="sect2"> -<h3 id="state"><a class="link" href="#state">State</a></h3> -<div class="paragraph"> -<p><strong>Status:</strong> Experimental</p> -</div> -<div class="paragraph"> -<p>The State monad is one of the special cases of monads most commonly used in -Haskell. It has several purposes including: lazy computation, composition, and -maintaining state without explicitly passing it to every function manualy.</p> -</div> -<div class="paragraph"> -<p>The de-facto monadic type of the state monad is a plain function. A function -represents a computation as is (without executing it). Obviously, a function -should have some special characteristics to work in monad state composition.</p> -</div> -<div class="listingblock"> -<div class="title">Valid function for the state monad</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">state</span><span class="tok-p">]</span> - <span class="tok-s">"Takes a state as argument and returns a vector</span> -<span class="tok-s"> with the first element being the processed value and</span> -<span class="tok-s"> the second element being the new transformed state."</span> - <span class="tok-p">(</span><span class="tok-k">let </span><span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)</span> - <span class="tok-nv">newstate</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">)]</span> - <span class="tok-p">[</span><span class="tok-nv">newvalue</span> <span class="tok-nv">newstate</span><span class="tok-p">]))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>You just saw an example of the low-level primitive state monad. For basic usage -you do not need to write your own functions, just use some helpers that <em>cats</em> -provides.</p> -</div> -<div class="paragraph"> -<p>Let’s look at one example before explaining the details:</p> -</div> -<div class="listingblock"> -<div class="title">Lazy composition of computations</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.state</span> <span class="tok-ss">:as</span> <span class="tok-nv">st</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">st/get-state</span><span class="tok-p">)</span> - <span class="tok-nv">_</span> <span class="tok-p">(</span><span class="tok-nf">st/put-state</span> <span class="tok-p">(</span><span class="tok-nb">next </span><span class="tok-nv">state</span><span class="tok-p">))]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">first </span><span class="tok-nv">state</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => #<State cats.labs.state.State@2eebabb6></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>At the moment of evaluation in the previous expression, nothing of what we -have defined is executed. But instead of returning the unadorned final value -of the computation, a strange/unknown object of type <strong>State</strong> is returned.</p> -</div> -<div class="paragraph"> -<p>The State type is simply a wrapper for Clojure functions, nothing more.</p> -</div> -<div class="paragraph"> -<p>Now, it’s time to execute the composed computation. We can use one of the following -functions exposed by <em>cats</em> for that: <code>run-state</code>, <code>eval-state</code> and <code>exec-state</code>.</p> -</div> -<div class="ulist"> -<ul> -<li> -<p><code>run-state</code> executes the composed computation and returns both the value and the -final state.</p> -</li> -<li> -<p><code>eval-state</code> executes the composed computation and returns the resulting -value, discarding the state.</p> -</li> -<li> -<p><code>exec-state</code> executes the composed computation and returns only the resulting -state, ignoring the resulting value.</p> -</li> -</ul> -</div> -<div class="listingblock"> -<div class="title">Example of resuls of using the previosly listed functions</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/run-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => #<Pair [1 (2 3)]></span> - -<span class="tok-p">(</span><span class="tok-nf">m/eval-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => 1</span> - -<span class="tok-p">(</span><span class="tok-nf">m/exec-state</span> <span class="tok-nv">s</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => (2 3)</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>run-state</code> function returns an instance of the Pair type. The Pair type -acts like any other seq in Clojure with the exception that it can only contain -two values.</p> -</div> -</div> -<div class="sect2"> -<h3 id="reader"><a class="link" href="#reader">Reader</a></h3> -<div class="paragraph"> -<p><strong>Status:</strong> Experimental</p> -</div> -<div class="paragraph"> -<p>The reader monad is another commonly used monad in Haskell. It’s used for -gluing together computations that depend on a read-only environment. As with -the state monad, we don’t have to thread the environment manualy since the -monadic bind does it for us. The type of the reader monad are one-argument -functions.</p> -</div> -<div class="paragraph"> -<p>The Reader type is analogous to State, simply a wrapper for regular Clojure -functions. If we want our functions to participate in the reader abstraction -we have to wrap them in a Reader instance.</p> -</div> -<div class="listingblock"> -<div class="title">Valid function for the reader monad</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">start-server</span> - <span class="tok-p">(</span><span class="tok-nf">r/reader</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">env</span><span class="tok-p">]</span> - <span class="tok-s">"Takes an environment with options as an argument and runs a web</span> -<span class="tok-s"> server in the address specified by `:host` and `:port`."</span> - <span class="tok-p">(</span><span class="tok-nf">run-http-server</span> <span class="tok-p">(</span><span class="tok-ss">:host</span> <span class="tok-nv">env</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-ss">:port</span> <span class="tok-nv">env</span><span class="tok-p">)))))</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>cats provides a few reader functions already. <code>ask</code> is the simplest reader, -simply returns the environment. We can execute readers using the <code>run-reader</code> -function which accepts a reader and an environment.</p> -</div> -<div class="listingblock"> -<div class="title">Example of running the ask reader</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">r/run-reader</span> <span class="tok-nv">r/ask</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [1 2 3]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Let’s use <code>mlet</code> for building new readers out of existing ones:</p> -</div> -<div class="listingblock"> -<div class="title">Example of composing reader computations</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">env</span> <span class="tok-nv">r/ask</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">env</span><span class="tok-p">)))</span> -<span class="tok-c1">;; => #<Reader cats.labs.reader.Reader@2eebabb6></span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>We can then run it using <code>run-reader</code>:</p> -</div> -<div class="listingblock"> -<div class="title">Example of composing reader computations</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">r/run-reader</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">env</span> <span class="tok-nv">r/ask</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">env</span><span class="tok-p">)))</span> - <span class="tok-mi">41</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>We can also alter the reader’s environment in a context using the <code>local</code> -function which given a function and a reader returns a new reader whose -environment is the result of applying the first function given to <code>local</code> to -the original environment. Let’s see it in action to understand it better:</p> -</div> -<div class="listingblock"> -<div class="title">Example of composing reader computations</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.reader</span> <span class="tok-ss">:as</span> <span class="tok-nv">r</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">r/run-reader</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">env</span> <span class="tok-p">(</span><span class="tok-nf">r/local</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-mi">2</span> <span class="tok-nv">%</span><span class="tok-p">)</span> <span class="tok-nv">r/ask</span><span class="tok-p">)]</span> - <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">env</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> - <span class="tok-mi">20</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Note that since we executed <code>ask</code> with the function <code>#(*2 %)</code> altering its -original environment (20), the resulting <code>env</code> value is two times the original -environment.</p> -</div> -</div> -<div class="sect2"> -<h3 id="writer"><a class="link" href="#writer">Writer</a></h3> -<div class="paragraph"> -<p><strong>Status:</strong> Experimental</p> -</div> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="continuation"><a class="link" href="#continuation">Continuation</a></h3> -<div class="paragraph"> -<p><strong>Status:</strong> Experimental</p> -</div> -<div class="paragraph"> -<p>TODO</p> -</div> -</div> -<div class="sect2"> -<h3 id="lens"><a class="link" href="#lens">Lens</a></h3> -<div class="paragraph"> -<p><strong>Status:</strong> Stable</p> -</div> -<div class="paragraph"> -<p>Implementation of functional references to one value modeled as functions. Is -a generalization of get and put mapping to the particular part of a data -structure.</p> -</div> -<div class="sect3"> -<h4 id="first-steps"><a class="link" href="#first-steps">First steps</a></h4> -<div class="paragraph"> -<p>We’ll start by using the most basic lens, the identity lens. We can get the value -a lens is focused on using the <code>focus</code> function in <code>cats.labs.lens</code> ns:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.lens</span> <span class="tok-ss">:as</span> <span class="tok-nv">l</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">l/id</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [0 1 2 3]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>We have two other primitives available: the <code>put</code> operation and <code>over</code>, which lets -us apply a function over the focused value of a lens:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/id</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => 42</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/id</span> <span class="tok-nb">count </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => 4</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>There are some builtin lenses that can be used out of the box such as <code>fst</code>, <code>snd</code> -and <code>nth</code>. Let see some examples on how them can be used:</p> -</div> -<div class="listingblock"> -<div class="title">Example using <code>fst</code> lense</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-c1">;; Focus over the first element of a vector</span> -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">l/fst</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => 1</span> - -<span class="tok-c1">;; Apply a function over first element of a vector</span> -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">l/fst</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [2 2 3]</span> - -<span class="tok-c1">;; Replace the first value of an element of a vector</span> -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">l/fst</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [42 2 3]</span></code></pre> -</div> -</div> -<div class="listingblock"> -<div class="title">Example using the <code>nth</code> lense</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => 3</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [1 2 4]</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [1 2 42]</span></code></pre> -</div> -</div> -</div> -<div class="sect3"> -<h4 id="lenses-composition"><a class="link" href="#lenses-composition">Lenses composition</a></h4> -<div class="paragraph"> -<p>One of the big advantatges of the lenses implementation of cats library is that -them are implemented using plain functions:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">my-lens</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">l/fst</span> <span class="tok-nv">l/fst</span> <span class="tok-p">(</span><span class="tok-nf">l/nth</span> <span class="tok-mi">2</span><span class="tok-p">)))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">data</span> - <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> - <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> - -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">my-lens</span> <span class="tok-nv">data</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 2</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">my-lens</span> <span class="tok-mi">42</span> <span class="tok-nv">data</span><span class="tok-p">)</span> -<span class="tok-c1">;; => [[0 1 42] [3 4 5]]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Lenses compose with regular function composition and, like transducers, the -combined lens runs from left to right.</p> -</div> -</div> -<div class="sect3"> -<h4 id="builtin-lenses"><a class="link" href="#builtin-lenses">Builtin lenses</a></h4> -<div class="paragraph"> -<p>There’s <code>key</code> and <code>select-keys</code> for focusing on one or multiple keys respectively:</p> -</div> -<div class="listingblock"> -<div class="title">Example focusing in a specific key/keys of associative data structure</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/key</span> <span class="tok-ss">:a</span><span class="tok-p">)</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> -<span class="tok-c1">;; => 1</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/key</span> <span class="tok-ss">:a</span><span class="tok-p">)</span> <span class="tok-nb">str </span><span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> -<span class="tok-c1">;; => {:a "1", :b 2}</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/key</span> <span class="tok-ss">:a</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> -<span class="tok-c1">;; => {:a 42, :b 2}</span> - -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:a</span><span class="tok-p">])</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> -<span class="tok-c1">;; => {:a 1}</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:c</span><span class="tok-p">])</span> - <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">m</span><span class="tok-p">]</span> - <span class="tok-p">(</span><span class="tok-nb">zipmap </span><span class="tok-p">(</span><span class="tok-nb">keys </span><span class="tok-nv">m</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nb">repeat </span><span class="tok-mi">42</span><span class="tok-p">)))</span> - <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span><span class="tok-p">})</span> -<span class="tok-c1">;; => {:b 2, :a 42}</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:c</span><span class="tok-p">])</span> - <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">0</span><span class="tok-p">}</span> - <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-mi">1</span> <span class="tok-ss">:b</span> <span class="tok-mi">2</span> <span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">})</span> -<span class="tok-c1">;; => {:b 2, :a 0}</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p><code>in</code> for focusing on a path:</p> -</div> -<div class="listingblock"> -<div class="title">Example focusing in neest data structures</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> - <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> -<span class="tok-c1">;; => {:c 42}</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">zipmap </span><span class="tok-p">(</span><span class="tok-nb">vals </span><span class="tok-nv">%</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nb">keys </span><span class="tok-nv">%</span><span class="tok-p">))</span> - <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> -<span class="tok-c1">;; => {:a {:b {42 :c}}}</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/in</span> <span class="tok-p">[</span><span class="tok-ss">:a</span> <span class="tok-ss">:b</span><span class="tok-p">])</span> - <span class="tok-mi">42</span> - <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-p">{</span><span class="tok-ss">:c</span> <span class="tok-mi">42</span><span class="tok-p">}}})</span> -<span class="tok-c1">;; => {:a {:b 42}}</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Let’s take a look at a combinator that will let us build a unit-conversion lens -called <code>units</code>. We have to supply a function to convert from unit <code>a</code> to unit <code>b</code> -and viceversa:</p> -</div> -<div class="listingblock"> -<div class="title">Example definiting a "unit conversion" lense</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">sec->min</span> <span class="tok-p">[</span><span class="tok-nv">sec</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">/ </span><span class="tok-nv">sec</span> <span class="tok-mi">60</span><span class="tok-p">))</span> -<span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">min->sec</span> <span class="tok-p">[</span><span class="tok-nv">min</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">* min </span><span class="tok-mi">60</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">mins</span> <span class="tok-p">(</span><span class="tok-nf">l/units</span> <span class="tok-nv">sec->min</span> - <span class="tok-nv">min->sec</span><span class="tok-p">))</span> - -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-nv">mins</span> <span class="tok-mi">120</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 2</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-nv">mins</span> <span class="tok-mi">3</span> <span class="tok-mi">120</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 180</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-nv">mins</span> <span class="tok-nb">inc </span><span class="tok-mi">60</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 120</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>And conditional lenses that can be defined using a predicate function and -returns a lens that focuses in an element only if it passes the predicate:</p> -</div> -<div class="listingblock"> -<div class="title">Example focusing using conditional lenses</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 2</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 3</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">2</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 42</span> - -<span class="tok-p">(</span><span class="tok-nf">l/focus</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => nil</span> - -<span class="tok-p">(</span><span class="tok-nf">l/over</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-nb">inc </span><span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 1</span> - -<span class="tok-p">(</span><span class="tok-nf">l/put</span> <span class="tok-p">(</span><span class="tok-nf">l/passes</span> <span class="tok-nv">even?</span><span class="tok-p">)</span> <span class="tok-mi">42</span> <span class="tok-mi">1</span><span class="tok-p">)</span> -<span class="tok-c1">;; => 1</span></code></pre> -</div> -</div> -</div> -<div class="sect3"> -<h4 id="interoperability"><a class="link" href="#interoperability">Interoperability</a></h4> -<div class="paragraph"> -<p>There are also <code>Focus</code> type that allows you to derive atom like objects from -clojure atoms focusing to a specific portion of it using lenses.</p> -</div> -<div class="paragraph"> -<p>Let see an example focusing on a concrete set of keys on an asociative -data structure referenced by an atom:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">state</span> <span class="tok-p">(</span><span class="tok-nf">atom</span> <span class="tok-p">{</span><span class="tok-ss">:x</span> <span class="tok-mi">1</span> <span class="tok-ss">:y</span> <span class="tok-mi">2</span> <span class="tok-ss">:z</span> <span class="tok-mi">3</span><span class="tok-p">}))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">state-d</span> - <span class="tok-p">(</span><span class="tok-nf">l/focus-atom</span> <span class="tok-p">(</span><span class="tok-nf">l/select-keys</span> <span class="tok-p">[</span><span class="tok-ss">:x</span> <span class="tok-ss">:y</span><span class="tok-p">])</span> <span class="tok-nv">state</span><span class="tok-p">))</span> - -<span class="tok-o">@</span><span class="tok-nv">state-d</span> -<span class="tok-c1">;; => {:x 1 :y 2}</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The object returned by <code>focus-atom</code> function behaves identically to a clojure -atom and it can be treated as drop in replacement of it:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">swap!</span> <span class="tok-nv">state-d</span> <span class="tok-nv">update</span> <span class="tok-ss">:x</span> <span class="tok-nv">inc</span><span class="tok-p">)</span> - -<span class="tok-o">@</span><span class="tok-nv">state</span> -<span class="tok-c1">;; => {:x 2 :y 2 :z 3}</span> - -<span class="tok-o">@</span><span class="tok-nv">state-d</span> -<span class="tok-c1">;; => {:x 2 :y 2}</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>And do not forget that you also can attach watchers to focused atoms in the same -way as you will do that with clojure(script) atoms.</p> -</div> -</div> -</div> -<div class="sect2"> -<h3 id="traversals"><a class="link" href="#traversals">Traversals</a></h3> -<div class="paragraph"> -<p><strong>Status:</strong> Experimental</p> -</div> -<div class="paragraph"> -<p>A traversal is similar to a lens but it focuses on multiple values instead of one.</p> -</div> -<div class="sect3"> -<h4 id="first-steps-2"><a class="link" href="#first-steps-2">First steps</a></h4> -<div class="paragraph"> -<p>Therefore, we use the <code>foci</code> function for viewing the focused elements of a -traversal.</p> -</div> -<div class="paragraph"> -<p>Let’s look at the identity traversal, it’s called <code>it</code>:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.traversal</span> <span class="tok-ss">:as</span> <span class="tok-nv">t</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/it</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => (42)</span> - -<span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/it</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => ([0 1 2 3])</span> - -<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-nv">t/it</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => 42</span> - -<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-nv">t/it</span> <span class="tok-nb">count </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => 4</span></code></pre> -</div> -</div> -</div> -<div class="sect3"> -<h4 id="traversals-composition"><a class="link" href="#traversals-composition">Traversals composition</a></h4> -<div class="paragraph"> -<p>Traversals like lenses are defined in terms of functions so the same approach -also applies to traversals. Them can be composed just using <code>comp</code> or any -other function composition technique.</p> -</div> -<div class="paragraph"> -<p>Traversals should be composed with other traversals. You can compose lenses -with a traversal but it will become a traversal and you will have to use <code>foci</code> -for viewing its values.</p> -</div> -</div> -<div class="sect3"> -<h4 id="builtin-traversals"><a class="link" href="#builtin-traversals">Builtin traversals</a></h4> -<div class="paragraph"> -<p>The <code>each</code> traversal focuses every value in a collection, allowing us to map -preservering structure. The <code>cat</code> traversal flattens a nested collection:</p> -</div> -<div class="listingblock"> -<div class="title">Example using <code>each</code> traversal</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/each</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => (0 1 2 3)</span> - -<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-nv">t/each</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [1 2 3 4]</span> - -<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-nv">t/each</span> <span class="tok-mi">42</span> <span class="tok-p">[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [42 42 42 42]</span> - -<span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-nv">t/cat</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> -<span class="tok-c1">;; => (0 1 2 3 4 5)</span> - -<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-nv">t/cat</span> <span class="tok-nb">inc </span><span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> -<span class="tok-c1">;; => [[1 2 3] [4 5 6]]</span> - -<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-nv">t/cat</span> <span class="tok-mi">42</span> <span class="tok-p">[[</span><span class="tok-mi">0</span> <span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]])</span> -<span class="tok-c1">;; => [[42 42 42] [42 42 42]]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>The <code>filter</code> traversal can be used to filter can be used to filter the results -of another by composition:</p> -</div> -<div class="listingblock"> -<div class="title">Example using <code>filter</code> traversal</div> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">t/each</span> <span class="tok-p">(</span><span class="tok-nf">t/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> - <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> -<span class="tok-c1">;; => (1 3 5)</span> - -<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">t/each</span> <span class="tok-p">(</span><span class="tok-nf">t/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> - <span class="tok-nv">inc</span> - <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [2 2 4 4 6]</span> - -<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-p">(</span><span class="tok-nb">comp </span><span class="tok-nv">t/each</span> <span class="tok-p">(</span><span class="tok-nf">t/filter</span> <span class="tok-nv">odd?</span><span class="tok-p">))</span> - <span class="tok-mi">42</span> - <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [42 2 42 4 42]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Using <code>only</code> is equivalent to composing <code>each</code> and <code>filter</code>:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">t/foci</span> <span class="tok-p">(</span><span class="tok-nf">t/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> - <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> -<span class="tok-c1">;; => (1 3 5)</span> - -<span class="tok-p">(</span><span class="tok-nf">t/over</span> <span class="tok-p">(</span><span class="tok-nf">t/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> - <span class="tok-nv">inc</span> - <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [2 2 4 4 6]</span> - -<span class="tok-p">(</span><span class="tok-nf">t/put</span> <span class="tok-p">(</span><span class="tok-nf">t/only</span> <span class="tok-nv">odd?</span><span class="tok-p">)</span> - <span class="tok-mi">42</span> - <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> -<span class="tok-c1">;; => [42 2 42 4 42]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>Another interesting traversals include <code>keys</code> for focusing on map keys, <code>vals</code> -for focusing on map values, and <code>indexed</code> for focusing on index-value pairs.</p> -</div> -</div> -<div class="sect3"> -<h4 id="interoperability-2"><a class="link" href="#interoperability-2">Interoperability</a></h4> -<div class="paragraph"> -<p>There are also <code>Foci</code> type that allows you to derive atom like objects from -clojure atoms focusing to a specific portion of it using traversals.</p> -</div> -<div class="paragraph"> -<p>Let see an example:</p> -</div> -<div class="listingblock"> -<div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.traversal</span> <span class="tok-ss">:as</span> <span class="tok-nv">t</span><span class="tok-p">])</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">atom</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">]))</span> - -<span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">fsa</span> <span class="tok-p">(</span><span class="tok-nf">t/foci-atom</span> <span class="tok-nv">t/each</span> <span class="tok-nv">a</span><span class="tok-p">))</span> - -<span class="tok-o">@</span><span class="tok-nv">fsa</span> -<span class="tok-c1">;; => (1 2 3 4)</span> - -<span class="tok-p">(</span><span class="tok-nf">reset!</span> <span class="tok-nv">fsa</span> <span class="tok-mi">42</span><span class="tok-p">)</span> -<span class="tok-c1">;; => (42 42 42 42)</span> - -<span class="tok-o">@</span><span class="tok-nv">a</span> -<span class="tok-c1">;; => [42 42 42 42]</span></code></pre> -</div> -</div> -<div class="paragraph"> -<p>And do not forget that you also can attach watchers to focused atoms in the same -way as you will do that with clojure(script) atoms.</p> -</div> -</div> -</div> </div> </div> <div class="sect1"> <h2 id="complementary-libraries"><a class="link" href="#complementary-libraries">Complementary libraries</a></h2> <div class="sectionbody"> -<div class="paragraph"> -<p>Some monads are defined as separated package to avoid additional -and unnecesary dependencies to cats. Also, there are some libraries -that build higher-level abstractions on top of what cats offers.</p> -</div> <div class="ulist"> <ul> <li> @@ -2909,7 +2085,7 @@ <h3 id="license"><a class="link" href="#license">License</a></h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2016-01-03 11:37:27 CET +Last updated 2016-06-29 18:04:14 EEST </div> </div> </body> From bba74fddb1d059aa14fbbe3601ba828132a93d17 Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Thu, 20 Apr 2017 14:47:42 +0100 Subject: [PATCH 51/52] Generate documentation --- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 83 ++++++++++++++++++++++------ latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 +- latest/api/cats.labs.manifold.html | 2 +- latest/api/cats.labs.promise.html | 2 +- latest/api/cats.labs.test.html | 2 +- latest/api/cats.monad.either.html | 6 +- latest/api/cats.monad.exception.html | 14 ++++- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 8 ++- latest/api/cats.protocols.html | 4 +- latest/api/cats.util.html | 2 +- latest/api/index.html | 2 +- latest/index.html | 31 ++++++++--- 16 files changed, 124 insertions(+), 42 deletions(-) diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index 2073ac5..9dc6cef 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L501">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L484">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L437">view source</a></div></div><div class="public anchor" id="var-lazy-sequence-context"><h3><a href="#var-lazy-sequence-context">lazy-sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L157">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L335">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L535">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L233">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L383">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L552">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L518">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L501">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L484">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L437">view source</a></div></div><div class="public anchor" id="var-lazy-sequence-context"><h3><a href="#var-lazy-sequence-context">lazy-sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L157">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L335">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L535">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L233">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L383">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L552">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L518">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index 9d9c4e9..5312345 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-context.3F"><h3><a href="#var-context.3F">context?</a></h3><div class="usage"><code>(context? v)</code></div><div class="doc"><div class="markdown"><p>Returnt <code>true</code> if the provided value satisfies the Context protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L38">view source</a></div></div><div class="public anchor" id="var-get-current"><h3><a href="#var-get-current">get-current</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-current & args)</code></div><div class="doc"><div class="markdown"><p>Deprecated alias to <code>infer</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L83">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L45">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L56">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-context.3F"><h3><a href="#var-context.3F">context?</a></h3><div class="usage"><code>(context? v)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the provided value satisfies the Context protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L38">view source</a></div></div><div class="public anchor" id="var-get-current"><h3><a href="#var-get-current">get-current</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-current & args)</code></div><div class="doc"><div class="markdown"><p>Deprecated alias to <code>infer</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L83">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L45">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L56">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index b90cd8e..d3b9773 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,8 +1,38 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p><p>You can think of it as generalizing the <code>some-></code> thread macro to all Monads instead of just Maybe.</p><p>Alternatively, if you think of the regular thread macro as sugar for <code>let</code>:</p><p>(-> :a b (c (other args)) d) => (let [res (b :a) res (c res (other args)) res (d res)] res)</p><p>Then <code>->=</code> is sugar for cats.core/mlet:</p><p>(->= m-a b (c (other args)) d) (mlet [res m-a res (c res (other args)) res (d res)] (return res))</p><p>Note that extra args in this context are assumed pure, and will be evaluated along with the function itself; this also matches the behavior of <code>some-></code> wrt extra args.</p><p>Threading through pure functions is somewhat awkward, but can be done:</p><p>(->= m-a monadic-fn (-> pure-fn other-pure-fn m/return) other-monadic-fn)</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L552">view source</a></div></div><div class="public anchor" id="var--.3E.3E.3D"><h3><a href="#var--.3E.3E.3D">->>=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->>= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like ->>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L597">view source</a></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L872">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L876">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L915">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L930">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L901">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L907">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L893">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p><p>Let’s see it in action:</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p> +<p>You can think of it as generalizing the <code>some-></code> thread macro to all Monads instead of just Maybe.</p> +<p>Alternatively, if you think of the regular thread macro as sugar for <code>let</code>:</p> +<p>(-> :a b (c (other args)) d) => (let [res (b :a) res (c res (other args)) res (d res)] res)</p> +<p>Then <code>->=</code> is sugar for cats.core/mlet:</p> +<p>(->= m-a b (c (other args)) d) (mlet [res m-a res (c res (other args)) res (d res)] (return res))</p> +<p>Note that extra args in this context are assumed pure, and will be evaluated along with the function itself; this also matches the behavior of <code>some-></code> wrt extra args.</p> +<p>Threading through pure functions is somewhat awkward, but can be done:</p> +<p>(->= m-a monadic-fn (-> pure-fn other-pure-fn m/return) other-monadic-fn)</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L561">view source</a></div></div><div class="public anchor" id="var--.3E.3E.3D"><h3><a href="#var--.3E.3E.3D">->>=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->>= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like ->>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L606">view source</a></div></div><div class="public anchor" id="var-.3C.24.3E"><h3><a href="#var-.3C.24.3E"><$></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fmap</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L881">view source</a></div></div><div class="public anchor" id="var-.3C*.3E"><h3><a href="#var-.3C*.3E"><*></a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A Haskell-style <code>fapply</code> alias.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L885">view source</a></div></div><div class="public anchor" id="var-.3C.3D.3C"><h3><a href="#var-.3C.3D.3C"><=<</a></h3><div class="usage"><code>(<=< mg mf x)</code></div><div class="doc"><div class="markdown"><p>Right-to-left composition of monads. Same as <code>>=></code> with its first two arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L924">view source</a></div></div><div class="public anchor" id="var-.3C.3E"><h3><a href="#var-.3C.3E"><></a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L939">view source</a></div></div><div class="public anchor" id="var-.3D.3C.3C"><h3><a href="#var-.3D.3C.3C">=<<</a></h3><div class="usage"><code>(=<< f mv)</code></div><div class="doc"><div class="markdown"><p>Same as the two argument version of <code>>>=</code> but with the arguments flipped.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L910">view source</a></div></div><div class="public anchor" id="var-.3E.3D.3E"><h3><a href="#var-.3E.3D.3E">>=></a></h3><div class="usage"><code>(>=> mf mg x)</code></div><div class="doc"><div class="markdown"><p>Left-to-right composition of monads.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L916">view source</a></div></div><div class="public anchor" id="var-.3E.3E"><h3><a href="#var-.3E.3E">>></a></h3><div class="usage"><code>(>> mv mv')</code><code>(>> mv mv' & mvs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind, ignoring the values produced by the monadic computations.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L902">view source</a></div></div><div class="public anchor" id="var-.3E.3E.3D"><h3><a href="#var-.3E.3E.3D">>>=</a></h3><div class="usage"><code>(>>= mv f)</code><code>(>>= mv f & fs)</code></div><div class="doc"><div class="markdown"><p>Perform a Haskell-style left-associative bind.</p> +<p>Let’s see it in action:</p> <pre><code>(>>= (just 1) (comp just inc) (comp just inc)) ;; => #<Just [3]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L880">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p><p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p><p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p><p>Now see how this code can be made clearer by using the alet macro:</p><p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p><p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p><p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p><p>This is greatly simplified using <code>alet</code>:</p><p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p><p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L404">view source</a></div></div><div class="public anchor" id="var-ap"><h3><a href="#var-ap">ap</a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap f & args)</code></div><div class="doc"><div class="markdown"><p>Apply a pure function to applicative arguments, e.g.</p><p>(ap + (just 1) (just 2) (just 3)) ;; => #<Just [6]> (ap str [“hi” “lo”] [“bye” “woah” “hey”]) ;; => [“hibye” “hiwoah” “hihey” “lobye” “lowoah” “lohey”]</p><p><code>ap</code> is essentially sugar for <code>(apply fapply (pure f) args)</code>, but for the common case where you have a pure, uncurried, possibly variadic function.</p><p><code>ap</code> actually desugars in <code>alet</code> form:</p><p>(macroexpand-1 `(ap + (just 1) (just2))) ;; => (alet [a1 (just 1) a2 (just 2)] (+ a1 a2))</p><p>That way, variadic functions Just Work, without needing to specify an arity separately.</p><p>If you’re familiar with Haskell, this is closest to writing “in Applicative style”: you can straightforwardly convert pure function application to effectful application by with some light syntax (<$> and <*> in case of Haskell, and <code>ap</code> here).</p><p>See the original Applicative paper for more inspiration: <a href="http://staff.city.ac.uk/~ross/papers/Applicative.pdf">http://staff.city.ac.uk/~ross/papers/Applicative.pdf</a></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L471">view source</a></div></div><div class="public anchor" id="var-ap-.3E"><h3><a href="#var-ap-.3E">ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap-> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>-></code>, within an applicative idiom.</p><p>Compare:</p><p>(macroexpand-1 `(-> a b c (d e f))) => (d (c (b a) e f)</p><p>with:</p><p>(macroexpand-1 `(ap-> a b c (d e f)) => (ap d (ap c (ap b a) e f))</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L504">view source</a></div></div><div class="public anchor" id="var-ap-.3E.3E"><h3><a href="#var-ap-.3E.3E">ap->></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap->> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>->></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L527">view source</a></div></div><div class="public anchor" id="var-as-.3E.3D"><h3><a href="#var-as-.3E.3D">as->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(as->= expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>as-></code>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L607">view source</a></div></div><div class="public anchor" id="var-as-ap-.3E"><h3><a href="#var-as-ap-.3E">as-ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(as-ap-> expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>as-></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L540">view source</a></div></div><div class="public anchor" id="var-bimap"><h3><a href="#var-bimap">bimap</a></h3><div class="usage"><code>(bimap f g)</code><code>(bimap f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p><p>Given functions <code>f</code> and <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to a first argument or <code>g</code> to a second argument.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L889">view source</a></div></div><div class="public anchor" id="var-alet"><h3><a href="#var-alet">alet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(alet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Applicative composition macro similar to Clojure’s <code>let</code>. This macro facilitates composition of applicative computations using <code>fmap</code> and <code>fapply</code> and evaluating applicative values in parallel.</p> +<p>Let’s see an example to understand how it works. This code uses fmap for executing computations inside an applicative context:</p> +<p>(fmap (fn [a] (inc a)) (just 1)) ;=> #<Just [2]></p> +<p>Now see how this code can be made clearer by using the alet macro:</p> +<p>(alet [a (just 1)] (inc a)) ;=> #<Just [2]></p> +<p>Let’s look at a more complex example, imagine we have dependencies between applicative values:</p> +<p>(join (fapply (fmap (fn [a] (fn [b] (fmap (fn [c] (inc c)) (just (+ a b))))) (just 1)) (just 2))) ;=> #<Just [4]></p> +<p>This is greatly simplified using <code>alet</code>:</p> +<p>(alet [a (just 1) b (just 2) c (just (+ a b))] (inc c)) ;=> #<Just [4]></p> +<p>The intent of the code is much clearer and evaluates <code>a</code> and <code>b</code> at the same time, then proceeds to evaluate <code>c</code> when all the values it depends on are available. This evaluation strategy is specially helpful for asynchronous applicatives.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L413">view source</a></div></div><div class="public anchor" id="var-ap"><h3><a href="#var-ap">ap</a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap f & args)</code></div><div class="doc"><div class="markdown"><p>Apply a pure function to applicative arguments, e.g.</p> +<p>(ap + (just 1) (just 2) (just 3)) ;; => #<Just [6]> (ap str [“hi” “lo”] [“bye” “woah” “hey”]) ;; => [“hibye” “hiwoah” “hihey” “lobye” “lowoah” “lohey”]</p> +<p><code>ap</code> is essentially sugar for <code>(apply fapply (pure f) args)</code>, but for the common case where you have a pure, uncurried, possibly variadic function.</p> +<p><code>ap</code> actually desugars in <code>alet</code> form:</p> +<p>(macroexpand-1 `(ap + (just 1) (just2))) ;; => (alet [a1 (just 1) a2 (just 2)] (+ a1 a2))</p> +<p>That way, variadic functions Just Work, without needing to specify an arity separately.</p> +<p>If you’re familiar with Haskell, this is closest to writing “in Applicative style”: you can straightforwardly convert pure function application to effectful application by with some light syntax (<$> and <*> in case of Haskell, and <code>ap</code> here).</p> +<p>See the original Applicative paper for more inspiration: <a href="http://staff.city.ac.uk/~ross/papers/Applicative.pdf">http://staff.city.ac.uk/~ross/papers/Applicative.pdf</a></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L480">view source</a></div></div><div class="public anchor" id="var-ap-.3E"><h3><a href="#var-ap-.3E">ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap-> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>-></code>, within an applicative idiom.</p> +<p>Compare:</p> +<p>(macroexpand-1 `(-> a b c (d e f))) => (d (c (b a) e f)</p> +<p>with:</p> +<p>(macroexpand-1 `(ap-> a b c (d e f)) => (ap d (ap c (ap b a) e f))</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L513">view source</a></div></div><div class="public anchor" id="var-ap-.3E.3E"><h3><a href="#var-ap-.3E.3E">ap->></a></h3><h4 class="type">macro</h4><div class="usage"><code>(ap->> x & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>->></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L536">view source</a></div></div><div class="public anchor" id="var-as-.3E.3D"><h3><a href="#var-as-.3E.3D">as->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(as->= expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>as-></code>, but with monadic binding instead of pure application. See <code>cats.labs.sugar/->=</code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L616">view source</a></div></div><div class="public anchor" id="var-as-ap-.3E"><h3><a href="#var-as-ap-.3E">as-ap-></a></h3><h4 class="type">macro</h4><div class="usage"><code>(as-ap-> expr name & forms)</code></div><div class="doc"><div class="markdown"><p>Thread like <code>as-></code>, within an applicative idiom. See <code>cats.labs.sugar/ap-></code> for more in-depth discussion.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L549">view source</a></div></div><div class="public anchor" id="var-bimap"><h3><a href="#var-bimap">bimap</a></h3><div class="usage"><code>(bimap f g)</code><code>(bimap f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p> +<p>Given functions <code>f</code> and <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to a first argument or <code>g</code> to a second argument.</p> <pre><code>(bimap dec inc (either/right 1) ;; => #<Right 2> @@ -12,7 +42,9 @@ <pre><code>(bind (either/right 1) (fn [v] (return (inc v)))) ;; => #<Right [2]> -</code></pre><p>For convenience, you may prefer to use the <code>mlet</code> macro, which provides a beautiful, <code>let</code>-like syntax for composing operations with the <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L81">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function, return another which is curried.</p><p>With inferred arity (function must have one fixed arity):</p> +</code></pre> +<p>For convenience, you may prefer to use the <code>mlet</code> macro, which provides a beautiful, <code>let</code>-like syntax for composing operations with the <code>bind</code> function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L81">view source</a></div></div><div class="public anchor" id="var-curry"><h3><a href="#var-curry">curry</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry f)</code><code>(curry n f)</code></div><div class="doc"><div class="markdown"><p>Given either a fixed arity function or an arity and a function, return another which is curried.</p> +<p>With inferred arity (function must have one fixed arity):</p> <pre><code>(defn add2 [x y] (+ x y)) (def cadd2 (curry add2)) @@ -21,7 +53,8 @@ (cadd2 1 3) ;; => 4 -</code></pre><p>With given arity:</p> +</code></pre> +<p>With given arity:</p> <pre><code>(def c+ (curry 3 +)) ((c+ 1 2) 3) @@ -29,7 +62,9 @@ ((((c+) 1) 2) 3) ;; => 6 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L652">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L635">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L763">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L924">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p><p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L186">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p><p>Otherwise, return the instance unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L661">view source</a></div></div><div class="public anchor" id="var-curry*"><h3><a href="#var-curry*">curry*</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry* args body)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L644">view source</a></div></div><div class="public anchor" id="var-curry-lift-m"><h3><a href="#var-curry-lift-m">curry-lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(curry-lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Composition of <code>curry</code> and <code>lift-m</code></p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L772">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract v)</code></div><div class="doc"><div class="markdown"><p>Generic function to unwrap/extract the inner value of a container.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L933">view source</a></div></div><div class="public anchor" id="var-fapply"><h3><a href="#var-fapply">fapply</a></h3><div class="usage"><code>(fapply af & avs)</code></div><div class="doc"><div class="markdown"><p>Given a function wrapped in a monadic context <code>af</code>, and a value wrapped in a monadic context <code>av</code>, apply the unwrapped function to the unwrapped value and return the result, wrapped in the same context as <code>av</code>.</p> +<p>This function is variadic, so it can be used like a Haskell-style left-associative fapply.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L186">view source</a></div></div><div class="public anchor" id="var-filter"><h3><a href="#var-filter">filter</a></h3><div class="usage"><code>(filter p mv)</code></div><div class="doc"><div class="markdown"><p>Apply a predicate to a value in a <code>MonadZero</code> instance, returning the identity element when the predicate does not hold.</p> +<p>Otherwise, return the instance unchanged.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (require '[cats.core :as m]) @@ -38,7 +73,7 @@ (m/filter (partial < 4) (maybe/just 3)) ;=> <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L848">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L939">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L857">view source</a></div></div><div class="public anchor" id="var-fmap"><h3><a href="#var-fmap">fmap</a></h3><div class="usage"><code>(fmap f)</code><code>(fmap f fv)</code></div><div class="doc"><div class="markdown"><p>Apply a function <code>f</code> to the value wrapped in functor <code>fv</code>, preserving the context type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L122">view source</a></div></div><div class="public anchor" id="var-foldl"><h3><a href="#var-foldl">foldl</a></h3><div class="usage"><code>(foldl f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a left-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L948">view source</a></div></div><div class="public anchor" id="var-foldm"><h3><a href="#var-foldm">foldm</a></h3><div class="usage"><code>(foldm f z xs)</code><code>(foldm ctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Given an optional monadic context, a function that takes two non-monadic arguments and returns a value inside the given monadic context, an initial value, and a collection of values, perform a left-associative fold.</p> <pre><code>(require '[cats.context :as ctx] '[cats.core :as m] '[cats.monad.maybe :as maybe]) @@ -62,23 +97,34 @@ (ctx/with-context maybe/context (foldm m-div 1 [])) ;; => #<Just 1> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L946">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L932">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p><p>Let’s see a little example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L955">view source</a></div></div><div class="public anchor" id="var-foldr"><h3><a href="#var-foldr">foldr</a></h3><div class="usage"><code>(foldr f z xs)</code></div><div class="doc"><div class="markdown"><p>Perform a right-associative fold on the data structure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L941">view source</a></div></div><div class="public anchor" id="var-forseq"><h3><a href="#var-forseq">forseq</a></h3><div class="usage"><code>(forseq vs mf)</code></div><div class="doc"><div class="markdown"><p>Same as <code>mapseq</code> but with the arguments flipped.</p> +<p>Let’s see a little example:</p> <pre><code>(m/forseq [2 3] maybe/just) ;; => <Just [[2 3]]> -</code></pre><p>Yet an other example that fails:</p> +</code></pre> +<p>Yet an other example that fails:</p> <pre><code>(m/forseq [1 2] (fn [v] (if (odd? v) (maybe/just v) (maybe/nothing)))) ;; => <Nothing> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L828">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left-map"><h3><a href="#var-left-map">left-map</a></h3><div class="usage"><code>(left-map f)</code><code>(left-map f bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the first argument.</p><p>Given a function <code>f</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to the first argument, if present, otherwise leave <code>bv</code> unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L837">view source</a></div></div><div class="public anchor" id="var-guard"><h3><a href="#var-guard">guard</a></h3><div class="usage"><code>(guard b)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L110">view source</a></div></div><div class="public anchor" id="var-join"><h3><a href="#var-join">join</a></h3><div class="usage"><code>(join mv)</code></div><div class="doc"><div class="markdown"><p>Remove one level of monadic structure. This is the same as <code>(bind mv identity)</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L116">view source</a></div></div><div class="public anchor" id="var-left-map"><h3><a href="#var-left-map">left-map</a></h3><div class="usage"><code>(left-map f)</code><code>(left-map f bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the first argument.</p> +<p>Given a function <code>f</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>f</code> to the first argument, if present, otherwise leave <code>bv</code> unchanged.</p> <pre><code>(left-map dec (either/right 1) ;; => #<Right 1> (left-map dec (either/left 1) ;; => #<Left 0> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L152">view source</a></div></div><div class="public anchor" id="var-lift-a"><h3><a href="#var-lift-a">lift-a</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-a f)</code><code>(lift-a n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to an applicative context.</p><p>(def app+ (lift-a 2 +))</p><p>(app+ (maybe/just 1) (maybe/just 2)) ;; => <Just 3></p><p>(app+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(app+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L728">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p><p>(def monad+ (lift-m 2 +))</p><p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p><p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p><p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L693">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L152">view source</a></div></div><div class="public anchor" id="var-lift-a"><h3><a href="#var-lift-a">lift-a</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-a f)</code><code>(lift-a n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to an applicative context.</p> +<p>(def app+ (lift-a 2 +))</p> +<p>(app+ (maybe/just 1) (maybe/just 2)) ;; => <Just 3></p> +<p>(app+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p> +<p>(app+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L737">view source</a></div></div><div class="public anchor" id="var-lift-m"><h3><a href="#var-lift-m">lift-m</a></h3><h4 class="type">macro</h4><div class="usage"><code>(lift-m f)</code><code>(lift-m n f)</code></div><div class="doc"><div class="markdown"><p>Lift a function with a given fixed arity to a monadic context.</p> +<p>(def monad+ (lift-m 2 +))</p> +<p>(monad+ (maybe/just 1) (maybe/just 2)) ;; => <Just [3]></p> +<p>(monad+ (maybe/just 1) (maybe/nothing)) ;; => <Nothing></p> +<p>(monad+ [0 2 4] [1 2]) ;; => [1 2 3 4 5 6]</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L702">view source</a></div></div><div class="public anchor" id="var-mappend"><h3><a href="#var-mappend">mappend</a></h3><div class="usage"><code>(mappend & svs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L48">view source</a></div></div><div class="public anchor" id="var-mapseq"><h3><a href="#var-mapseq">mapseq</a></h3><div class="usage"><code>(mapseq mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a function <code>mf</code> that takes a value and puts it into a monadic context, and a collection, map <code>mf</code> over the collection, calling <code>sequence</code> on the results.</p> <pre><code>(require '[cats.context :as ctx] '[cats.monad.maybe :as maybe] '[cats.core :as m]) @@ -96,26 +142,31 @@ (ctx/with-context maybe/context (mapseq #(maybe/just (* % 2)) [])) ;; => #<Just [()]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L802">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p><p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L811">view source</a></div></div><div class="public anchor" id="var-mempty"><h3><a href="#var-mempty">mempty</a></h3><div class="usage"><code>(mempty)</code><code>(mempty ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L44">view source</a></div></div><div class="public anchor" id="var-mlet"><h3><a href="#var-mlet">mlet</a></h3><h4 class="type">macro</h4><div class="usage"><code>(mlet bindings & body)</code></div><div class="doc"><div class="markdown"><p>Monad composition macro that works like Clojure’s <code>let</code>. This facilitates much easier composition of monadic computations.</p> +<p>Let’s see an example to understand how it works. This code uses bind to compose a few operations:</p> <pre><code>(bind (just 1) (fn [a] (bind (just (inc a)) (fn [b] (return (* b 2)))))) ;=> #<Just [4]> -</code></pre><p>Now see how this code can be made clearer by using the mlet macro:</p> +</code></pre> +<p>Now see how this code can be made clearer by using the mlet macro:</p> <pre><code>(mlet [a (just 1) b (just (inc a))] (return (* b 2))) ;=> #<Just [4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L224">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p><p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p><p>Example:</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L233">view source</a></div></div><div class="public anchor" id="var-mplus"><h3><a href="#var-mplus">mplus</a></h3><div class="usage"><code>(mplus & mvs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L104">view source</a></div></div><div class="public anchor" id="var-mzero"><h3><a href="#var-mzero">mzero</a></h3><div class="usage"><code>(mzero)</code><code>(mzero ctx)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L98">view source</a></div></div><div class="public anchor" id="var-pure"><h3><a href="#var-pure">pure</a></h3><div class="usage"><code>(pure v)</code><code>(pure ctx v)</code></div><div class="doc"><div class="markdown"><p>Given any value <code>v</code>, return it wrapped in the default/effect-free context.</p> +<p>This is a multi-arity function that with arity <code>pure/1</code> uses the dynamic scope to resolve the current context. With <code>pure/2</code>, you can force a specific context value.</p> +<p>Example:</p> <pre><code>(with-context either/context (pure 1)) ;; => #<Right [1]> (pure either/context 1) ;; => #<Right [1]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L54">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L75">view source</a></div></div><div class="public anchor" id="var-right-map"><h3><a href="#var-right-map">right-map</a></h3><div class="usage"><code>(right-map g)</code><code>(right-map g bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the second argument.</p><p>Given a function <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>g</code> to the second argument, if present, otherwise leave <code>bv</code> unchanged.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L54">view source</a></div></div><div class="public anchor" id="var-return"><h3><a href="#var-return">return</a></h3><div class="usage"><code>(return v)</code><code>(return ctx v)</code></div><div class="doc"><div class="markdown"><p>This is a monad version of <code>pure</code> and works identically to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L75">view source</a></div></div><div class="public anchor" id="var-right-map"><h3><a href="#var-right-map">right-map</a></h3><div class="usage"><code>(right-map g)</code><code>(right-map g bv)</code></div><div class="doc"><div class="markdown"><p>Map covariantly over the second argument.</p> +<p>Given a function <code>g</code> and a value wrapped in a bifunctor <code>bv</code>, apply <code>g</code> to the second argument, if present, otherwise leave <code>bv</code> unchanged.</p> <pre><code>(right-map inc (either/right 1) ;; => #<Right 2> @@ -135,7 +186,7 @@ (ctx/with-context maybe/context (m/sequence [])) ;; => #<Just [()]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L772">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L781">view source</a></div></div><div class="public anchor" id="var-traverse"><h3><a href="#var-traverse">traverse</a></h3><div class="usage"><code>(traverse f tv)</code><code>(traverse ctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.</p> <pre><code>(defn inc-if-even [n] (if (even? n) @@ -145,4 +196,4 @@ (ctx/with-context maybe/context (m/traverse inc-if-even [2 4])) ;; => #<Just [3 4]> -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L988">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L210">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L199">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L997">view source</a></div></div><div class="public anchor" id="var-unless"><h3><a href="#var-unless">unless</a></h3><h4 class="type">macro</h4><div class="usage"><code>(unless b mv)</code><code>(unless ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is not logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L214">view source</a></div></div><div class="public anchor" id="var-when"><h3><a href="#var-when">when</a></h3><h4 class="type">macro</h4><div class="usage"><code>(when b mv)</code><code>(when ctx b mv)</code></div><div class="doc"><div class="markdown"><p>Given an expression and a monadic value, if the expression is logical true, return the monadic value. Otherwise, return nil in a monadic context.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/core.cljc#L200">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index 7d56129..2e0f651 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L126">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L126">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html index 5acbe38..15a054e 100644 --- a/latest/api/cats.labs.channel.html +++ b/latest/api/cats.labs.channel.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html index 9aee5b5..b658438 100644 --- a/latest/api/cats.labs.manifold.html +++ b/latest/api/cats.labs.manifold.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EDeferredContext"><h3><a href="#var--.3EDeferredContext">->DeferredContext</a></h3><div class="usage"><code>(->DeferredContext timeout timeout-value)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.manifold.DeferredContext.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L101">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L95">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EDeferredContext"><h3><a href="#var--.3EDeferredContext">->DeferredContext</a></h3><div class="usage"><code>(->DeferredContext timeout timeout-value)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.manifold.DeferredContext.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L101">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L95">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.promise.html b/latest/api/cats.labs.promise.html index 7c8146f..0864bc0 100644 --- a/latest/api/cats.labs.promise.html +++ b/latest/api/cats.labs.promise.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.promise documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.promise</h2><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="public anchor" id="var-promise-context"><h3><a href="#var-promise-context">promise-context</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Deprecated alias for <code>context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/promise.cljc#L57">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.promise documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.promise</h2><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="public anchor" id="var-promise-context"><h3><a href="#var-promise-context">promise-context</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Deprecated alias for <code>context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/promise.cljc#L57">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.test.html b/latest/api/cats.labs.test.html index 5508c76..c3add21 100644 --- a/latest/api/cats.labs.test.html +++ b/latest/api/cats.labs.test.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.test documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3 current"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.test</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-applicative-composition"><h3><a href="#var-applicative-composition">applicative-composition</a></h3><div class="usage"><code>(applicative-composition {:keys [ctx gen appf appg eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L141">view source</a></div></div><div class="public anchor" id="var-applicative-homomorphism"><h3><a href="#var-applicative-homomorphism">applicative-homomorphism</a></h3><div class="usage"><code>(applicative-homomorphism {:keys [ctx gen f eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L129">view source</a></div></div><div class="public anchor" id="var-applicative-identity-law"><h3><a href="#var-applicative-identity-law">applicative-identity-law</a></h3><div class="usage"><code>(applicative-identity-law {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L123">view source</a></div></div><div class="public anchor" id="var-applicative-interchange"><h3><a href="#var-applicative-interchange">applicative-interchange</a></h3><div class="usage"><code>(applicative-interchange {:keys [ctx gen appf eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L135">view source</a></div></div><div class="public anchor" id="var-bifunctor-bimap-identity"><h3><a href="#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a></h3><div class="usage"><code>(bifunctor-bimap-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L109">view source</a></div></div><div class="public anchor" id="var-bifunctor-composition"><h3><a href="#var-bifunctor-composition">bifunctor-composition</a></h3><div class="usage"><code>(bifunctor-composition {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L115">view source</a></div></div><div class="public anchor" id="var-bifunctor-first-identity"><h3><a href="#var-bifunctor-first-identity">bifunctor-first-identity</a></h3><div class="usage"><code>(bifunctor-first-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L98">view source</a></div></div><div class="public anchor" id="var-bifunctor-second-identity"><h3><a href="#var-bifunctor-second-identity">bifunctor-second-identity</a></h3><div class="usage"><code>(bifunctor-second-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L103">view source</a></div></div><div class="public anchor" id="var-first-functor-law"><h3><a href="#var-first-functor-law">first-functor-law</a></h3><div class="usage"><code>(first-functor-law {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L84">view source</a></div></div><div class="public anchor" id="var-first-monad-law"><h3><a href="#var-first-monad-law">first-monad-law</a></h3><div class="usage"><code>(first-monad-law {:keys [ctx mf gen eq], :or {gen gen/any, eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L153">view source</a></div></div><div class="public anchor" id="var-gen-context"><h3><a href="#var-gen-context">gen-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L35">view source</a></div></div><div class="public anchor" id="var-monadplus-associativity"><h3><a href="#var-monadplus-associativity">monadplus-associativity</a></h3><div class="usage"><code>(monadplus-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L175">view source</a></div></div><div class="public anchor" id="var-monadzero-bind"><h3><a href="#var-monadzero-bind">monadzero-bind</a></h3><div class="usage"><code>(monadzero-bind {:keys [ctx gen zero eq], :or {zero (m/mzero ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L192">view source</a></div></div><div class="public anchor" id="var-monadzero-identity-element"><h3><a href="#var-monadzero-identity-element">monadzero-identity-element</a></h3><div class="usage"><code>(monadzero-identity-element {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L184">view source</a></div></div><div class="public anchor" id="var-monoid-identity-element"><h3><a href="#var-monoid-identity-element">monoid-identity-element</a></h3><div class="usage"><code>(monoid-identity-element {:keys [ctx gen empty eq], :or {empty (m/mempty ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L74">view source</a></div></div><div class="public anchor" id="var-second-functor-law"><h3><a href="#var-second-functor-law">second-functor-law</a></h3><div class="usage"><code>(second-functor-law {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L90">view source</a></div></div><div class="public anchor" id="var-second-monad-law"><h3><a href="#var-second-monad-law">second-monad-law</a></h3><div class="usage"><code>(second-monad-law {:keys [ctx eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L159">view source</a></div></div><div class="public anchor" id="var-semigroup-associativity"><h3><a href="#var-semigroup-associativity">semigroup-associativity</a></h3><div class="usage"><code>(semigroup-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L63">view source</a></div></div><div class="public anchor" id="var-third-monad-law"><h3><a href="#var-third-monad-law">third-monad-law</a></h3><div class="usage"><code>(third-monad-law {:keys [ctx f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L166">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.test documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3 current"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.test</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-applicative-composition"><h3><a href="#var-applicative-composition">applicative-composition</a></h3><div class="usage"><code>(applicative-composition {:keys [ctx gen appf appg eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L141">view source</a></div></div><div class="public anchor" id="var-applicative-homomorphism"><h3><a href="#var-applicative-homomorphism">applicative-homomorphism</a></h3><div class="usage"><code>(applicative-homomorphism {:keys [ctx gen f eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L129">view source</a></div></div><div class="public anchor" id="var-applicative-identity-law"><h3><a href="#var-applicative-identity-law">applicative-identity-law</a></h3><div class="usage"><code>(applicative-identity-law {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L123">view source</a></div></div><div class="public anchor" id="var-applicative-interchange"><h3><a href="#var-applicative-interchange">applicative-interchange</a></h3><div class="usage"><code>(applicative-interchange {:keys [ctx gen appf eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L135">view source</a></div></div><div class="public anchor" id="var-bifunctor-bimap-identity"><h3><a href="#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a></h3><div class="usage"><code>(bifunctor-bimap-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L109">view source</a></div></div><div class="public anchor" id="var-bifunctor-composition"><h3><a href="#var-bifunctor-composition">bifunctor-composition</a></h3><div class="usage"><code>(bifunctor-composition {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L115">view source</a></div></div><div class="public anchor" id="var-bifunctor-first-identity"><h3><a href="#var-bifunctor-first-identity">bifunctor-first-identity</a></h3><div class="usage"><code>(bifunctor-first-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L98">view source</a></div></div><div class="public anchor" id="var-bifunctor-second-identity"><h3><a href="#var-bifunctor-second-identity">bifunctor-second-identity</a></h3><div class="usage"><code>(bifunctor-second-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L103">view source</a></div></div><div class="public anchor" id="var-first-functor-law"><h3><a href="#var-first-functor-law">first-functor-law</a></h3><div class="usage"><code>(first-functor-law {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L84">view source</a></div></div><div class="public anchor" id="var-first-monad-law"><h3><a href="#var-first-monad-law">first-monad-law</a></h3><div class="usage"><code>(first-monad-law {:keys [ctx mf gen eq], :or {gen gen/any, eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L153">view source</a></div></div><div class="public anchor" id="var-gen-context"><h3><a href="#var-gen-context">gen-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L35">view source</a></div></div><div class="public anchor" id="var-monadplus-associativity"><h3><a href="#var-monadplus-associativity">monadplus-associativity</a></h3><div class="usage"><code>(monadplus-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L175">view source</a></div></div><div class="public anchor" id="var-monadzero-bind"><h3><a href="#var-monadzero-bind">monadzero-bind</a></h3><div class="usage"><code>(monadzero-bind {:keys [ctx gen zero eq], :or {zero (m/mzero ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L192">view source</a></div></div><div class="public anchor" id="var-monadzero-identity-element"><h3><a href="#var-monadzero-identity-element">monadzero-identity-element</a></h3><div class="usage"><code>(monadzero-identity-element {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L184">view source</a></div></div><div class="public anchor" id="var-monoid-identity-element"><h3><a href="#var-monoid-identity-element">monoid-identity-element</a></h3><div class="usage"><code>(monoid-identity-element {:keys [ctx gen empty eq], :or {empty (m/mempty ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L74">view source</a></div></div><div class="public anchor" id="var-second-functor-law"><h3><a href="#var-second-functor-law">second-functor-law</a></h3><div class="usage"><code>(second-functor-law {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L90">view source</a></div></div><div class="public anchor" id="var-second-monad-law"><h3><a href="#var-second-monad-law">second-monad-law</a></h3><div class="usage"><code>(second-monad-law {:keys [ctx eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L159">view source</a></div></div><div class="public anchor" id="var-semigroup-associativity"><h3><a href="#var-semigroup-associativity">semigroup-associativity</a></h3><div class="usage"><code>(semigroup-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L63">view source</a></div></div><div class="public anchor" id="var-third-monad-law"><h3><a href="#var-third-monad-law">third-monad-law</a></h3><div class="usage"><code>(third-monad-law {:keys [ctx f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L166">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index 37efa5e..b9523b6 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,6 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p><p>Also commonly known as Error monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p> +<p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) (either/right 1) @@ -7,4 +8,5 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L226">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L238">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p><p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L246">view source</a></div></div><div class="public anchor" id="var-either"><h3><a href="#var-either">either</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L236">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L136">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L264">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L268">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L272">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L114">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L124">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L256">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L119">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L130">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L260">view source</a></div></div><div class="public anchor" id="var-try-either"><h3><a href="#var-try-either">try-either</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-either & body)</code></div><div class="doc"><div class="markdown"><p>Try to evalute the body and return the result as an either. If an exception is thrown return the exception as a left, otherwise return the result as a right.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L281">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L256">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L268">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p> +<p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L276">view source</a></div></div><div class="public anchor" id="var-either"><h3><a href="#var-either">either</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L266">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L166">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L294">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L298">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L302">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L144">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L154">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L286">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L149">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L160">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L290">view source</a></div></div><div class="public anchor" id="var-try-either"><h3><a href="#var-try-either">try-either</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-either & body)</code></div><div class="doc"><div class="markdown"><p>Try to evalute the body and return the result as an either. If an exception is thrown return the exception as a left, otherwise return the result as a right.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L311">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index 201e9d4..5e91241 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,2 +1,14 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p><p>Also known as Try monad, popularized by Scala.</p><p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p><p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p><p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p><p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p><p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p><p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L198">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p><p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p><p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p><p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L66">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L72">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L263">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p><p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L268">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p> +<p>Also known as Try monad, popularized by Scala.</p> +<p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p> +<p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p> +<p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p> +<p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p> +<p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p> +<p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p> +<p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L198">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p> +<p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p> +<p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p> +<p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L66">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L72">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L263">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p> +<p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L268">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 75610c7..747ce59 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L71">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L71">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index c46e793..d1d1cdd 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,10 +1,12 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]> -</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L283">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p><p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p><p>Let see some examples:</p> +</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L313">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p> +<p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p> +<p>Let see some examples:</p> <pre><code>(from-maybe (just 1)) ;=> 1 @@ -13,4 +15,4 @@ (from-maybe (nothing) 42) ;=> 42 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L141">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L116">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L127">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L289">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L250">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L268">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L103">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L122">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L133">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L260">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L171">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L146">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L157">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L319">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L280">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L298">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L133">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L152">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L163">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L290">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index e91f33f..cfb5e3c 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,2 +1,4 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p><p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context or monadic value <code>app</code> and any value <code>v</code>, and puts the value <code>v</code> in the most minimal context (normally <code>mempty</code>) of same type of <code>app</code></p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L69">view source</a></div></div><div class="public anchor" id="var-Bifunctor"><h3><a href="#var-Bifunctor">Bifunctor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A ‘Functor’ of two arguments.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--bimap"><h3><a href="#var--bimap">-bimap</a></h3><div class="usage"><code>(-bimap btor f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L65">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p><p>A great example is the Maybe monad type Just. It implements this abstraction to establish that Just is part of the Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L35">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class to extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L56">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L78">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L90">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L100">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L95">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element with respect to an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>An abstraction to make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L43">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p> +<p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context or monadic value <code>app</code> and any value <code>v</code>, and puts the value <code>v</code> in the most minimal context (normally <code>mempty</code>) of same type of <code>app</code></p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L69">view source</a></div></div><div class="public anchor" id="var-Bifunctor"><h3><a href="#var-Bifunctor">Bifunctor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A ‘Functor’ of two arguments.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--bimap"><h3><a href="#var--bimap">-bimap</a></h3><div class="usage"><code>(-bimap btor f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L65">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p> +<p>A great example is the Maybe monad type Just. It implements this abstraction to establish that Just is part of the Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L35">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class to extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L56">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L78">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L90">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L100">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L95">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element with respect to an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>An abstraction to make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L43">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.util.html b/latest/api/cats.util.html index e0f3a98..2829f3f 100644 --- a/latest/api/cats.util.html +++ b/latest/api/cats.util.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 31fd6b4..693d6f8 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 2.0.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.0.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-lazy-sequence-context">lazy-sequence-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-context.3F">context?</a> </li><li> <a href="cats.context.html#var-get-current">get-current</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var--.3E.3D">->=</a> </li><li> <a href="cats.core.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-ap">ap</a> </li><li> <a href="cats.core.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.core.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.core.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.core.html#var-as-ap-.3E">as-ap-></a> </li><li> <a href="cats.core.html#var-bimap">bimap</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-left-map">left-map</a> </li><li> <a href="cats.core.html#var-lift-a">lift-a</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-right-map">right-map</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var--.3EDeferredContext">->DeferredContext</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.promise.html">cats.labs.promise</a></h3><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.promise.html#var-promise-context">promise-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.test.html">cats.labs.test</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.test.html#var-applicative-composition">applicative-composition</a> </li><li> <a href="cats.labs.test.html#var-applicative-homomorphism">applicative-homomorphism</a> </li><li> <a href="cats.labs.test.html#var-applicative-identity-law">applicative-identity-law</a> </li><li> <a href="cats.labs.test.html#var-applicative-interchange">applicative-interchange</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-composition">bifunctor-composition</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-first-identity">bifunctor-first-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-second-identity">bifunctor-second-identity</a> </li><li> <a href="cats.labs.test.html#var-first-functor-law">first-functor-law</a> </li><li> <a href="cats.labs.test.html#var-first-monad-law">first-monad-law</a> </li><li> <a href="cats.labs.test.html#var-gen-context">gen-context</a> </li><li> <a href="cats.labs.test.html#var-monadplus-associativity">monadplus-associativity</a> </li><li> <a href="cats.labs.test.html#var-monadzero-bind">monadzero-bind</a> </li><li> <a href="cats.labs.test.html#var-monadzero-identity-element">monadzero-identity-element</a> </li><li> <a href="cats.labs.test.html#var-monoid-identity-element">monoid-identity-element</a> </li><li> <a href="cats.labs.test.html#var-second-functor-law">second-functor-law</a> </li><li> <a href="cats.labs.test.html#var-second-monad-law">second-monad-law</a> </li><li> <a href="cats.labs.test.html#var-semigroup-associativity">semigroup-associativity</a> </li><li> <a href="cats.labs.test.html#var-third-monad-law">third-monad-law</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either">either</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li><li> <a href="cats.monad.either.html#var-try-either">try-either</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Bifunctor">Bifunctor</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 2.1.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-lazy-sequence-context">lazy-sequence-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-context.3F">context?</a> </li><li> <a href="cats.context.html#var-get-current">get-current</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var--.3E.3D">->=</a> </li><li> <a href="cats.core.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-ap">ap</a> </li><li> <a href="cats.core.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.core.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.core.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.core.html#var-as-ap-.3E">as-ap-></a> </li><li> <a href="cats.core.html#var-bimap">bimap</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-left-map">left-map</a> </li><li> <a href="cats.core.html#var-lift-a">lift-a</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-right-map">right-map</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var--.3EDeferredContext">->DeferredContext</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.promise.html">cats.labs.promise</a></h3><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.promise.html#var-promise-context">promise-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.test.html">cats.labs.test</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.test.html#var-applicative-composition">applicative-composition</a> </li><li> <a href="cats.labs.test.html#var-applicative-homomorphism">applicative-homomorphism</a> </li><li> <a href="cats.labs.test.html#var-applicative-identity-law">applicative-identity-law</a> </li><li> <a href="cats.labs.test.html#var-applicative-interchange">applicative-interchange</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-composition">bifunctor-composition</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-first-identity">bifunctor-first-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-second-identity">bifunctor-second-identity</a> </li><li> <a href="cats.labs.test.html#var-first-functor-law">first-functor-law</a> </li><li> <a href="cats.labs.test.html#var-first-monad-law">first-monad-law</a> </li><li> <a href="cats.labs.test.html#var-gen-context">gen-context</a> </li><li> <a href="cats.labs.test.html#var-monadplus-associativity">monadplus-associativity</a> </li><li> <a href="cats.labs.test.html#var-monadzero-bind">monadzero-bind</a> </li><li> <a href="cats.labs.test.html#var-monadzero-identity-element">monadzero-identity-element</a> </li><li> <a href="cats.labs.test.html#var-monoid-identity-element">monoid-identity-element</a> </li><li> <a href="cats.labs.test.html#var-second-functor-law">second-functor-law</a> </li><li> <a href="cats.labs.test.html#var-second-monad-law">second-monad-law</a> </li><li> <a href="cats.labs.test.html#var-semigroup-associativity">semigroup-associativity</a> </li><li> <a href="cats.labs.test.html#var-third-monad-law">third-monad-law</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either">either</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li><li> <a href="cats.monad.either.html#var-try-either">try-either</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Bifunctor">Bifunctor</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 56a87e4..0fb5ded 100644 --- a/latest/index.html +++ b/latest/index.html @@ -4,18 +4,20 @@ <meta charset="UTF-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.4"> +<meta name="generator" content="Asciidoctor 1.5.5"> <meta name="author" content="Andrey Antukh & Alejandro Gómez"> <title>Cats Documentation</title> <style> .listingblock .pygments .hll { background-color: #ffffcc } -.listingblock .pygments { background: #f0f0f0; } +.listingblock .pygments, .listingblock .pygments code { background: #f0f0f0; } .listingblock .pygments .tok-c { color: #60a0b0; font-style: italic } /* Comment */ .listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */ .listingblock .pygments .tok-k { color: #007020; font-weight: bold } /* Keyword */ .listingblock .pygments .tok-o { color: #666666 } /* Operator */ +.listingblock .pygments .tok-ch { color: #60a0b0; font-style: italic } /* Comment.Hashbang */ .listingblock .pygments .tok-cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */ .listingblock .pygments .tok-cp { color: #007020 } /* Comment.Preproc */ +.listingblock .pygments .tok-cpf { color: #60a0b0; font-style: italic } /* Comment.PreprocFile */ .listingblock .pygments .tok-c1 { color: #60a0b0; font-style: italic } /* Comment.Single */ .listingblock .pygments .tok-cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */ .listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */ @@ -55,8 +57,10 @@ .listingblock .pygments .tok-mh { color: #40a070 } /* Literal.Number.Hex */ .listingblock .pygments .tok-mi { color: #40a070 } /* Literal.Number.Integer */ .listingblock .pygments .tok-mo { color: #40a070 } /* Literal.Number.Oct */ +.listingblock .pygments .tok-sa { color: #4070a0 } /* Literal.String.Affix */ .listingblock .pygments .tok-sb { color: #4070a0 } /* Literal.String.Backtick */ .listingblock .pygments .tok-sc { color: #4070a0 } /* Literal.String.Char */ +.listingblock .pygments .tok-dl { color: #4070a0 } /* Literal.String.Delimiter */ .listingblock .pygments .tok-sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ .listingblock .pygments .tok-s2 { color: #4070a0 } /* Literal.String.Double */ .listingblock .pygments .tok-se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ @@ -67,9 +71,11 @@ .listingblock .pygments .tok-s1 { color: #4070a0 } /* Literal.String.Single */ .listingblock .pygments .tok-ss { color: #517918 } /* Literal.String.Symbol */ .listingblock .pygments .tok-bp { color: #007020 } /* Name.Builtin.Pseudo */ +.listingblock .pygments .tok-fm { color: #06287e } /* Name.Function.Magic */ .listingblock .pygments .tok-vc { color: #bb60d5 } /* Name.Variable.Class */ .listingblock .pygments .tok-vg { color: #bb60d5 } /* Name.Variable.Global */ .listingblock .pygments .tok-vi { color: #bb60d5 } /* Name.Variable.Instance */ +.listingblock .pygments .tok-vm { color: #bb60d5 } /* Name.Variable.Magic */ .listingblock .pygments .tok-il { color: #40a070 } /* Literal.Number.Integer.Long */ </style> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic|Liberation+Mono:400|Roboto+Slab:400,700"/> @@ -80,7 +86,7 @@ <h1>Cats Documentation</h1> <div class="details"> <span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">2.0.0</span> +<span id="revdate">2.1.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -199,7 +205,7 @@ <h2 id="install"><a class="link" href="#install">Install</a></h2> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"2.0.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"2.1.0"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -548,7 +554,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> </div> <div class="paragraph"> -<p>The <strong>Foldable</strong> abstraction is already implemented for cloure vectors, lazy seqs +<p>The <strong>Foldable</strong> abstraction is already implemented for Clojure vectors, lazy seqs and ranges plus the cats maybe, either and validation types. Let see an example how it behaves with maybe:</p> </div> @@ -1173,7 +1179,7 @@ <h4 id="set"><a class="link" href="#set">Set</a></h4> <pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> -<span class="tok-p">(</span><span class="tok-nf">m/pure</span> <span class="tok-nv">set-monad</span> <span class="tok-mi">42</span><span class="tok-p">)</span> +<span class="tok-p">(</span><span class="tok-nf">m/pure</span> <span class="tok-nv">set-context</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-c1">;; => #{42}</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-o">#</span><span class="tok-p">{</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">})</span> @@ -1717,7 +1723,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> <span class="tok-c1">;; <--- receiving request 200</span> <span class="tok-c1">;; ---> sending request 100</span> <span class="tok-c1">;; <--- receiving request 100</span> -<span class="tok-c1">;; "Elapsed time: 202.236804 msecs"</span> +<span class="tok-c1">;; "Elapsed time: 302.236804 msecs"</span> <span class="tok-c1">;; => 300</span></code></pre> </div> </div> @@ -1871,7 +1877,7 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De <span class="tok-c1">;; <--- receiving request 200</span> <span class="tok-c1">;; ---> sending request 100</span> <span class="tok-c1">;; <--- receiving request 100</span> -<span class="tok-c1">;; "Elapsed time: 202.236804 msecs"</span> +<span class="tok-c1">;; "Elapsed time: 302.236804 msecs"</span> <span class="tok-c1">;; => 200</span></code></pre> </div> </div> @@ -1910,6 +1916,9 @@ <h2 id="complementary-libraries"><a class="link" href="#complementary-libraries" <li> <p>Concurrent data fetching: <a href="https://github.com/funcool/urania" class="bare">https://github.com/funcool/urania</a></p> </li> +<li> +<p>Patter matching for the Cats' types: <a href="https://github.com/zalando/cats.match" class="bare">https://github.com/zalando/cats.match</a></p> +</li> </ul> </div> </div> @@ -1954,6 +1963,10 @@ <h3 id="what-clojure-types-implement-some-of-the-category-theory-abstractions">< <td class="tableblock halign-left valign-top"><p class="tableblock">hash-map</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid</p></td> </tr> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock">function</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">Semigroup, Monoid, Functor, Applicative, Monad</p></td> +</tr> </tbody> </table> </div> @@ -2085,7 +2098,7 @@ <h3 id="license"><a class="link" href="#license">License</a></h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2016-06-29 18:04:14 EEST +Last updated 2017-04-20 15:34:45 CEST </div> </div> </body> From df989452e825afd11fea26ca459fe809e1e4eb2a Mon Sep 17 00:00:00 2001 From: Andrey Antukh <niwi@niwi.nz> Date: Thu, 11 Jan 2018 12:00:24 +0100 Subject: [PATCH 52/52] Generate documentation --- latest/api/cats.builtin.html | 2 +- latest/api/cats.context.html | 2 +- latest/api/cats.core.html | 2 +- latest/api/cats.data.html | 2 +- latest/api/cats.labs.channel.html | 2 +- latest/api/cats.labs.manifold.html | 2 +- latest/api/cats.labs.promise.html | 2 +- latest/api/cats.labs.test.html | 2 +- latest/api/cats.monad.either.html | 6 +- latest/api/cats.monad.exception.html | 12 +- latest/api/cats.monad.identity.html | 2 +- latest/api/cats.monad.maybe.html | 6 +- latest/api/cats.protocols.html | 2 +- latest/api/cats.util.html | 2 +- latest/api/index.html | 2 +- latest/index.html | 178 +++++++++++++-------------- 16 files changed, 113 insertions(+), 113 deletions(-) diff --git a/latest/api/cats.builtin.html b/latest/api/cats.builtin.html index 9dc6cef..8b5179c 100644 --- a/latest/api/cats.builtin.html +++ b/latest/api/cats.builtin.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L501">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L484">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L437">view source</a></div></div><div class="public anchor" id="var-lazy-sequence-context"><h3><a href="#var-lazy-sequence-context">lazy-sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L157">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L335">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L535">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L233">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L383">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L552">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L518">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.builtin documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch current"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.builtin</h2><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="public anchor" id="var-all-monoid"><h3><a href="#var-all-monoid">all-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L501">view source</a></div></div><div class="public anchor" id="var-any-monoid"><h3><a href="#var-any-monoid">any-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L484">view source</a></div></div><div class="public anchor" id="var-function-context"><h3><a href="#var-function-context">function-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L437">view source</a></div></div><div class="public anchor" id="var-lazy-sequence-context"><h3><a href="#var-lazy-sequence-context">lazy-sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L157">view source</a></div></div><div class="public anchor" id="var-map-context"><h3><a href="#var-map-context">map-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L335">view source</a></div></div><div class="public anchor" id="var-prod-monoid"><h3><a href="#var-prod-monoid">prod-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L535">view source</a></div></div><div class="public anchor" id="var-range-context"><h3><a href="#var-range-context">range-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L233">view source</a></div></div><div class="public anchor" id="var-sequence-context"><h3><a href="#var-sequence-context">sequence-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L50">view source</a></div></div><div class="public anchor" id="var-set-context"><h3><a href="#var-set-context">set-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L383">view source</a></div></div><div class="public anchor" id="var-string-monoid"><h3><a href="#var-string-monoid">string-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L552">view source</a></div></div><div class="public anchor" id="var-sum-monoid"><h3><a href="#var-sum-monoid">sum-monoid</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L518">view source</a></div></div><div class="public anchor" id="var-vector-context"><h3><a href="#var-vector-context">vector-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/builtin.cljc#L262">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.context.html b/latest/api/cats.context.html index 5312345..3880ca8 100644 --- a/latest/api/cats.context.html +++ b/latest/api/cats.context.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-context.3F"><h3><a href="#var-context.3F">context?</a></h3><div class="usage"><code>(context? v)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the provided value satisfies the Context protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L38">view source</a></div></div><div class="public anchor" id="var-get-current"><h3><a href="#var-get-current">get-current</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-current & args)</code></div><div class="doc"><div class="markdown"><p>Deprecated alias to <code>infer</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L83">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L45">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L56">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.context documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch current"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.context</h2><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="public anchor" id="var-*context*"><h3><a href="#var-*context*">*context*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L30">view source</a></div></div><div class="public anchor" id="var-*override*"><h3><a href="#var-*override*">*override*</a></h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L31">view source</a></div></div><div class="public anchor" id="var-context.3F"><h3><a href="#var-context.3F">context?</a></h3><div class="usage"><code>(context? v)</code></div><div class="doc"><div class="markdown"><p>Return <code>true</code> if the provided value satisfies the Context protocol.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L39">view source</a></div></div><div class="public anchor" id="var-get-current"><h3><a href="#var-get-current">get-current</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"><code>(get-current & args)</code></div><div class="doc"><div class="markdown"><p>Deprecated alias to <code>infer</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L99">view source</a></div></div><div class="public anchor" id="var-with-context"><h3><a href="#var-with-context">with-context</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L46">view source</a></div></div><div class="public anchor" id="var-with-context-override"><h3><a href="#var-with-context-override">with-context-override</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-context-override ctx & body)</code></div><div class="doc"><div class="markdown"><p>Set current context to specific monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L57">view source</a></div></div><div class="public anchor" id="var-with-monad"><h3><a href="#var-with-monad">with-monad</a></h3><h4 class="type">macro</h4><div class="usage"><code>(with-monad ctx & body)</code></div><div class="doc"><div class="markdown"><p>Semantic alias for <code>with-context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/context.cljc#L69">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.core.html b/latest/api/cats.core.html index d3b9773..766f640 100644 --- a/latest/api/cats.core.html +++ b/latest/api/cats.core.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.core documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch current"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.core</h2><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="public anchor" id="var--.3E.3D"><h3><a href="#var--.3E.3D">->=</a></h3><h4 class="type">macro</h4><div class="usage"><code>(->= expr & forms)</code></div><div class="doc"><div class="markdown"><p>Like <code>-></code>, but with monadic binding instead of pure application. A mnemonic for the name is a pun on <code>>>=</code>, the monadic bind operator, and clojure’s regular arrow macros.</p> <p>You can think of it as generalizing the <code>some-></code> thread macro to all Monads instead of just Maybe.</p> <p>Alternatively, if you think of the regular thread macro as sugar for <code>let</code>:</p> <p>(-> :a b (c (other args)) d) => (let [res (b :a) res (c res (other args)) res (d res)] res)</p> diff --git a/latest/api/cats.data.html b/latest/api/cats.data.html index 2e0f651..768491d 100644 --- a/latest/api/cats.data.html +++ b/latest/api/cats.data.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L126">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.data documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch current"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.data</h2><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="public anchor" id="var-pair"><h3><a href="#var-pair">pair</a></h3><div class="usage"><code>(pair fst snd)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L82">view source</a></div></div><div class="public anchor" id="var-pair-monoid"><h3><a href="#var-pair-monoid">pair-monoid</a></h3><div class="usage"><code>(pair-monoid inner-monoid)</code></div><div class="doc"><div class="markdown"><p>A pair monoid type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L126">view source</a></div></div><div class="public anchor" id="var-pair.3F"><h3><a href="#var-pair.3F">pair?</a></h3><div class="usage"><code>(pair? v)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/data.cljc#L86">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.channel.html b/latest/api/cats.labs.channel.html index 15a054e..ef246b9 100644 --- a/latest/api/cats.labs.channel.html +++ b/latest/api/cats.labs.channel.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.channel documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch current"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.channel</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-channel.3F"><h3><a href="#var-channel.3F">channel?</a></h3><div class="usage"><code>(channel? c)</code></div><div class="doc"><div class="markdown"><p>Return true if a <code>c</code> is a channel.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L53">view source</a></div></div><div class="public anchor" id="var-with-value"><h3><a href="#var-with-value">with-value</a></h3><div class="usage"><code>(with-value value)</code><code>(with-value value ch)</code></div><div class="doc"><div class="markdown"><p>Simple helper that creates a channel and attach an value to it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/channel.cljc#L45">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.manifold.html b/latest/api/cats.labs.manifold.html index b658438..f95e706 100644 --- a/latest/api/cats.labs.manifold.html +++ b/latest/api/cats.labs.manifold.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EDeferredContext"><h3><a href="#var--.3EDeferredContext">->DeferredContext</a></h3><div class="usage"><code>(->DeferredContext timeout timeout-value)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.manifold.DeferredContext.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L101">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L95">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.manifold documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.manifold</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var--.3EDeferredContext"><h3><a href="#var--.3EDeferredContext">->DeferredContext</a></h3><div class="usage"><code>(->DeferredContext timeout timeout-value)</code></div><div class="doc"><div class="markdown"><p>Positional factory function for class cats.labs.manifold.DeferredContext.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L47">view source</a></div></div><div class="public anchor" id="var-deferred-context"><h3><a href="#var-deferred-context">deferred-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>A default context for manifold deferred.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L101">view source</a></div></div><div class="public anchor" id="var-deferred-context*"><h3><a href="#var-deferred-context*">deferred-context*</a></h3><div class="usage"><code>(deferred-context*)</code><code>(deferred-context* timeout)</code><code>(deferred-context* timeout timeout-value)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/manifold.clj#L95">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.promise.html b/latest/api/cats.labs.promise.html index 0864bc0..15f3e24 100644 --- a/latest/api/cats.labs.promise.html +++ b/latest/api/cats.labs.promise.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.promise documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.promise</h2><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="public anchor" id="var-promise-context"><h3><a href="#var-promise-context">promise-context</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Deprecated alias for <code>context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/promise.cljc#L57">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.promise documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch current"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.promise</h2><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="public anchor" id="var-promise-context"><h3><a href="#var-promise-context">promise-context</a></h3><h4 class="deprecated">deprecated</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Deprecated alias for <code>context</code>.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/promise.cljc#L57">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.labs.test.html b/latest/api/cats.labs.test.html index c3add21..dc80e60 100644 --- a/latest/api/cats.labs.test.html +++ b/latest/api/cats.labs.test.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.test documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3 current"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.test</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-applicative-composition"><h3><a href="#var-applicative-composition">applicative-composition</a></h3><div class="usage"><code>(applicative-composition {:keys [ctx gen appf appg eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L141">view source</a></div></div><div class="public anchor" id="var-applicative-homomorphism"><h3><a href="#var-applicative-homomorphism">applicative-homomorphism</a></h3><div class="usage"><code>(applicative-homomorphism {:keys [ctx gen f eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L129">view source</a></div></div><div class="public anchor" id="var-applicative-identity-law"><h3><a href="#var-applicative-identity-law">applicative-identity-law</a></h3><div class="usage"><code>(applicative-identity-law {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L123">view source</a></div></div><div class="public anchor" id="var-applicative-interchange"><h3><a href="#var-applicative-interchange">applicative-interchange</a></h3><div class="usage"><code>(applicative-interchange {:keys [ctx gen appf eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L135">view source</a></div></div><div class="public anchor" id="var-bifunctor-bimap-identity"><h3><a href="#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a></h3><div class="usage"><code>(bifunctor-bimap-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L109">view source</a></div></div><div class="public anchor" id="var-bifunctor-composition"><h3><a href="#var-bifunctor-composition">bifunctor-composition</a></h3><div class="usage"><code>(bifunctor-composition {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L115">view source</a></div></div><div class="public anchor" id="var-bifunctor-first-identity"><h3><a href="#var-bifunctor-first-identity">bifunctor-first-identity</a></h3><div class="usage"><code>(bifunctor-first-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L98">view source</a></div></div><div class="public anchor" id="var-bifunctor-second-identity"><h3><a href="#var-bifunctor-second-identity">bifunctor-second-identity</a></h3><div class="usage"><code>(bifunctor-second-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L103">view source</a></div></div><div class="public anchor" id="var-first-functor-law"><h3><a href="#var-first-functor-law">first-functor-law</a></h3><div class="usage"><code>(first-functor-law {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L84">view source</a></div></div><div class="public anchor" id="var-first-monad-law"><h3><a href="#var-first-monad-law">first-monad-law</a></h3><div class="usage"><code>(first-monad-law {:keys [ctx mf gen eq], :or {gen gen/any, eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L153">view source</a></div></div><div class="public anchor" id="var-gen-context"><h3><a href="#var-gen-context">gen-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L35">view source</a></div></div><div class="public anchor" id="var-monadplus-associativity"><h3><a href="#var-monadplus-associativity">monadplus-associativity</a></h3><div class="usage"><code>(monadplus-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L175">view source</a></div></div><div class="public anchor" id="var-monadzero-bind"><h3><a href="#var-monadzero-bind">monadzero-bind</a></h3><div class="usage"><code>(monadzero-bind {:keys [ctx gen zero eq], :or {zero (m/mzero ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L192">view source</a></div></div><div class="public anchor" id="var-monadzero-identity-element"><h3><a href="#var-monadzero-identity-element">monadzero-identity-element</a></h3><div class="usage"><code>(monadzero-identity-element {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L184">view source</a></div></div><div class="public anchor" id="var-monoid-identity-element"><h3><a href="#var-monoid-identity-element">monoid-identity-element</a></h3><div class="usage"><code>(monoid-identity-element {:keys [ctx gen empty eq], :or {empty (m/mempty ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L74">view source</a></div></div><div class="public anchor" id="var-second-functor-law"><h3><a href="#var-second-functor-law">second-functor-law</a></h3><div class="usage"><code>(second-functor-law {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L90">view source</a></div></div><div class="public anchor" id="var-second-monad-law"><h3><a href="#var-second-monad-law">second-monad-law</a></h3><div class="usage"><code>(second-monad-law {:keys [ctx eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L159">view source</a></div></div><div class="public anchor" id="var-semigroup-associativity"><h3><a href="#var-semigroup-associativity">semigroup-associativity</a></h3><div class="usage"><code>(semigroup-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L63">view source</a></div></div><div class="public anchor" id="var-third-monad-law"><h3><a href="#var-third-monad-law">third-monad-law</a></h3><div class="usage"><code>(third-monad-law {:keys [ctx f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L166">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.labs.test documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3 current"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.labs.test</h2><div class="doc"><div class="markdown"></div></div><div class="public anchor" id="var-applicative-composition"><h3><a href="#var-applicative-composition">applicative-composition</a></h3><div class="usage"><code>(applicative-composition {:keys [ctx gen appf appg eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L141">view source</a></div></div><div class="public anchor" id="var-applicative-homomorphism"><h3><a href="#var-applicative-homomorphism">applicative-homomorphism</a></h3><div class="usage"><code>(applicative-homomorphism {:keys [ctx gen f eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L129">view source</a></div></div><div class="public anchor" id="var-applicative-identity-law"><h3><a href="#var-applicative-identity-law">applicative-identity-law</a></h3><div class="usage"><code>(applicative-identity-law {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L123">view source</a></div></div><div class="public anchor" id="var-applicative-interchange"><h3><a href="#var-applicative-interchange">applicative-interchange</a></h3><div class="usage"><code>(applicative-interchange {:keys [ctx gen appf eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L135">view source</a></div></div><div class="public anchor" id="var-bifunctor-bimap-identity"><h3><a href="#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a></h3><div class="usage"><code>(bifunctor-bimap-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L109">view source</a></div></div><div class="public anchor" id="var-bifunctor-composition"><h3><a href="#var-bifunctor-composition">bifunctor-composition</a></h3><div class="usage"><code>(bifunctor-composition {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L115">view source</a></div></div><div class="public anchor" id="var-bifunctor-first-identity"><h3><a href="#var-bifunctor-first-identity">bifunctor-first-identity</a></h3><div class="usage"><code>(bifunctor-first-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L98">view source</a></div></div><div class="public anchor" id="var-bifunctor-second-identity"><h3><a href="#var-bifunctor-second-identity">bifunctor-second-identity</a></h3><div class="usage"><code>(bifunctor-second-identity {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L103">view source</a></div></div><div class="public anchor" id="var-first-functor-law"><h3><a href="#var-first-functor-law">first-functor-law</a></h3><div class="usage"><code>(first-functor-law {:keys [gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L84">view source</a></div></div><div class="public anchor" id="var-first-monad-law"><h3><a href="#var-first-monad-law">first-monad-law</a></h3><div class="usage"><code>(first-monad-law {:keys [ctx mf gen eq], :or {gen gen/any, eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L153">view source</a></div></div><div class="public anchor" id="var-gen-context"><h3><a href="#var-gen-context">gen-context</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L35">view source</a></div></div><div class="public anchor" id="var-monadplus-associativity"><h3><a href="#var-monadplus-associativity">monadplus-associativity</a></h3><div class="usage"><code>(monadplus-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L175">view source</a></div></div><div class="public anchor" id="var-monadzero-bind"><h3><a href="#var-monadzero-bind">monadzero-bind</a></h3><div class="usage"><code>(monadzero-bind {:keys [ctx gen zero eq], :or {zero (m/mzero ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L192">view source</a></div></div><div class="public anchor" id="var-monadzero-identity-element"><h3><a href="#var-monadzero-identity-element">monadzero-identity-element</a></h3><div class="usage"><code>(monadzero-identity-element {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L184">view source</a></div></div><div class="public anchor" id="var-monoid-identity-element"><h3><a href="#var-monoid-identity-element">monoid-identity-element</a></h3><div class="usage"><code>(monoid-identity-element {:keys [ctx gen empty eq], :or {empty (m/mempty ctx), eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L74">view source</a></div></div><div class="public anchor" id="var-second-functor-law"><h3><a href="#var-second-functor-law">second-functor-law</a></h3><div class="usage"><code>(second-functor-law {:keys [gen f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L90">view source</a></div></div><div class="public anchor" id="var-second-monad-law"><h3><a href="#var-second-monad-law">second-monad-law</a></h3><div class="usage"><code>(second-monad-law {:keys [ctx eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L159">view source</a></div></div><div class="public anchor" id="var-semigroup-associativity"><h3><a href="#var-semigroup-associativity">semigroup-associativity</a></h3><div class="usage"><code>(semigroup-associativity {:keys [ctx gen eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L63">view source</a></div></div><div class="public anchor" id="var-third-monad-law"><h3><a href="#var-third-monad-law">third-monad-law</a></h3><div class="usage"><code>(third-monad-law {:keys [ctx f g eq], :or {eq =}})</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/labs/test.cljc#L166">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.either.html b/latest/api/cats.monad.either.html index b9523b6..c60ff38 100644 --- a/latest/api/cats.monad.either.html +++ b/latest/api/cats.monad.either.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.either documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch current"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.either</h2><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p> <p>Also commonly known as Error monad.</p> <pre><code>(require '[cats.monad.either :as either]) @@ -8,5 +8,5 @@ (either/left 1) ;; => #<Left [1]> -</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L256">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L268">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p> -<p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L276">view source</a></div></div><div class="public anchor" id="var-either"><h3><a href="#var-either">either</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L266">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L166">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L294">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L298">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L302">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L144">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L154">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L286">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L149">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L160">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L290">view source</a></div></div><div class="public anchor" id="var-try-either"><h3><a href="#var-try-either">try-either</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-either & body)</code></div><div class="doc"><div class="markdown"><p>Try to evalute the body and return the result as an either. If an exception is thrown return the exception as a left, otherwise return the result as a right.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L311">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="public anchor" id="var-branch"><h3><a href="#var-branch">branch</a></h3><div class="usage"><code>(branch e lf rf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and two functions, if the either is a left apply the first function to the value it contains; if the either is a right apply the second function to its value.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L198">view source</a></div></div><div class="public anchor" id="var-branch-left"><h3><a href="#var-branch-left">branch-left</a></h3><div class="usage"><code>(branch-left e lf)</code></div><div class="doc"><div class="markdown"><p>Given an either value and a function, if the either is a left, apply the function to the value it contains; if the either is a right, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L210">view source</a></div></div><div class="public anchor" id="var-branch-right"><h3><a href="#var-branch-right">branch-right</a></h3><div class="usage"><code>(branch-right e rf)</code></div><div class="doc"><div class="markdown"><p>Either-specific synonym for #’cats.core/bind</p> +<p>Given an either value and a function, if the either is a right, apply the function to the value it contains; if the either is a left, return it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L218">view source</a></div></div><div class="public anchor" id="var-either"><h3><a href="#var-either">either</a></h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L208">view source</a></div></div><div class="public anchor" id="var-either.3F"><h3><a href="#var-either.3F">either?</a></h3><div class="usage"><code>(either? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Either monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L108">view source</a></div></div><div class="public anchor" id="var-first-left"><h3><a href="#var-first-left">first-left</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is left</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L236">view source</a></div></div><div class="public anchor" id="var-first-right"><h3><a href="#var-first-right">first-right</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of either, return the first value that is right</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L240">view source</a></div></div><div class="public anchor" id="var-invert"><h3><a href="#var-invert">invert</a></h3><div class="usage"><code>(invert e)</code></div><div class="doc"><div class="markdown"><p>Convert a left to a right or viceversa, preserving content.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L244">view source</a></div></div><div class="public anchor" id="var-left"><h3><a href="#var-left">left</a></h3><div class="usage"><code>(left)</code><code>(left v)</code></div><div class="doc"><div class="markdown"><p>A Left type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L86">view source</a></div></div><div class="public anchor" id="var-left.3F"><h3><a href="#var-left.3F">left?</a></h3><div class="usage"><code>(left? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Left type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L96">view source</a></div></div><div class="public anchor" id="var-lefts"><h3><a href="#var-lefts">lefts</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are left.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L228">view source</a></div></div><div class="public anchor" id="var-map-.3ELeft"><h3><a href="#var-map-.3ELeft">map->Left</a></h3><div class="usage"><code>(map->Left m__7585__auto__)</code></div><div class="doc"><div class="markdown"><p>Factory function for class cats.monad.either.Left, taking a map of keywords to field values.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L64">view source</a></div></div><div class="public anchor" id="var-map-.3ERight"><h3><a href="#var-map-.3ERight">map->Right</a></h3><div class="usage"><code>(map->Right m__7585__auto__)</code></div><div class="doc"><div class="markdown"><p>Factory function for class cats.monad.either.Right, taking a map of keywords to field values.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L48">view source</a></div></div><div class="public anchor" id="var-right"><h3><a href="#var-right">right</a></h3><div class="usage"><code>(right)</code><code>(right v)</code></div><div class="doc"><div class="markdown"><p>A Right type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L91">view source</a></div></div><div class="public anchor" id="var-right.3F"><h3><a href="#var-right.3F">right?</a></h3><div class="usage"><code>(right? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of Right type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L102">view source</a></div></div><div class="public anchor" id="var-rights"><h3><a href="#var-rights">rights</a></h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Given a collection of eithers, return only the values that are right.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L232">view source</a></div></div><div class="public anchor" id="var-try-either"><h3><a href="#var-try-either">try-either</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-either & body)</code></div><div class="doc"><div class="markdown"><p>Try to evalute the body and return the result as an either. If an exception is thrown return the exception as a left, otherwise return the result as a right.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/either.cljc#L253">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.exception.html b/latest/api/cats.monad.exception.html index 5e91241..7502085 100644 --- a/latest/api/cats.monad.exception.html +++ b/latest/api/cats.monad.exception.html @@ -1,14 +1,14 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.exception documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.exception</h2><div class="doc"><div class="markdown"><p>The Exception monad.</p> <p>Also known as Try monad, popularized by Scala.</p> <p>It represents a computation that may either result in an exception or return a successfully computed value. Is very similar to Either monad, but is semantically different.</p> <p>It consists in two types: Success and Failure. The Success type is a simple wrapper like Right of Either monad. But the Failure type is slightly different from Left, because it is forced to wrap an instance of Throwable (or Error in cljs).</p> <p>The most common use case of this monad is for wrap third party libraries that uses standard Exception based error handling. In normal circumstances you should use Either instead.</p> <p>The types defined for Exception monad (Success and Failure) also implementes the clojure IDeref interface which facilitates libraries developing using monadic composition without forcing a user of that library to use or understand monads.</p> -<p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L184">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p> +<p>That is because when you will dereference the failure instance, it will reraise the containing exception.</p></div></div><div class="public anchor" id="var-exception.3F"><h3><a href="#var-exception.3F">exception?</a></h3><div class="usage"><code>(exception? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Exception monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L157">view source</a></div></div><div class="public anchor" id="var-extract"><h3><a href="#var-extract">extract</a></h3><div class="usage"><code>(extract mv)</code><code>(extract mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from exception monad.</p> <p>This is a specialized version of <code>cats.core/extract</code> for Exception monad types that allows set up the default value.</p> -<p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L198">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p> +<p>If a provided <code>mv</code> is an instance of Failure type it will re raise the inner exception. If you need extract value without raising it, use <code>cats.core/extract</code> function for it.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L171">view source</a></div></div><div class="public anchor" id="var-failure"><h3><a href="#var-failure">failure</a></h3><div class="usage"><code>(failure e)</code><code>(failure e message)</code></div><div class="doc"><div class="markdown"><p>A failure type constructor.</p> <p>If a provided parameter is an exception, it wraps it in a <code>Failure</code> instance and return it. But if a provided parameter is arbitrary data, it tries create an exception from it using clojure <code>ex-info</code> function.</p> -<p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L155">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L178">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p> -<p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L147">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L172">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L66">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L72">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L250">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L257">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L263">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p> -<p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L268">view source</a></div></div></section></section></body></html> \ No newline at end of file +<p>Take care that <code>ex-info</code> function in clojurescript differs a little bit from clojure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L128">view source</a></div></div><div class="public anchor" id="var-failure.3F"><h3><a href="#var-failure.3F">failure?</a></h3><div class="usage"><code>(failure? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Failure type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L151">view source</a></div></div><div class="public anchor" id="var-map-.3EFailure"><h3><a href="#var-map-.3EFailure">map->Failure</a></h3><div class="usage"><code>(map->Failure m__7585__auto__)</code></div><div class="doc"><div class="markdown"><p>Factory function for class cats.monad.exception.Failure, taking a map of keywords to field values.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L98">view source</a></div></div><div class="public anchor" id="var-map-.3ESuccess"><h3><a href="#var-map-.3ESuccess">map->Success</a></h3><div class="usage"><code>(map->Success m__7585__auto__)</code></div><div class="doc"><div class="markdown"><p>Factory function for class cats.monad.exception.Success, taking a map of keywords to field values.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L82">view source</a></div></div><div class="public anchor" id="var-success"><h3><a href="#var-success">success</a></h3><div class="usage"><code>(success v)</code></div><div class="doc"><div class="markdown"><p>A Success type constructor.</p> +<p>It wraps any arbitrary value into success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L120">view source</a></div></div><div class="public anchor" id="var-success.3F"><h3><a href="#var-success.3F">success?</a></h3><div class="usage"><code>(success? v)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Success type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L145">view source</a></div></div><div class="public anchor" id="var-throw-exception"><h3><a href="#var-throw-exception">throw-exception</a></h3><div class="usage"><code>(throw-exception message)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L66">view source</a></div></div><div class="public anchor" id="var-throwable.3F"><h3><a href="#var-throwable.3F">throwable?</a></h3><div class="usage"><code>(throwable? e)</code></div><div class="doc"><div class="markdown"><p>Return true if <code>v</code> is an instance of the Throwable or js/Error type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L72">view source</a></div></div><div class="public anchor" id="var-try-on"><h3><a href="#var-try-on">try-on</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-on expr)</code></div><div class="doc"><div class="markdown"><p>Wraps a computation and return success of failure.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L223">view source</a></div></div><div class="public anchor" id="var-try-or-else"><h3><a href="#var-try-or-else">try-or-else</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-else expr defaultvalue)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L230">view source</a></div></div><div class="public anchor" id="var-try-or-recover"><h3><a href="#var-try-or-recover">try-or-recover</a></h3><h4 class="type">macro</h4><div class="usage"><code>(try-or-recover expr func)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L236">view source</a></div></div><div class="public anchor" id="var-wrap"><h3><a href="#var-wrap">wrap</a></h3><div class="usage"><code>(wrap func)</code></div><div class="doc"><div class="markdown"><p>Wrap a function in a try monad.</p> +<p>Is a high order function that accept a function as parameter and returns an other that returns success or failure depending of result of the first function.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/exception.cljc#L241">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.identity.html b/latest/api/cats.monad.identity.html index 747ce59..b72c982 100644 --- a/latest/api/cats.monad.identity.html +++ b/latest/api/cats.monad.identity.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L71">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.identity documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch current"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.identity</h2><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="public anchor" id="var-identity"><h3><a href="#var-identity">identity</a></h3><div class="usage"><code>(identity v)</code></div><div class="doc"><div class="markdown"><p>The Identity type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L57">view source</a></div></div><div class="public anchor" id="var-identity.3F"><h3><a href="#var-identity.3F">identity?</a></h3><div class="usage"><code>(identity? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Identity monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L62">view source</a></div></div><div class="public anchor" id="var-map-.3EIdentity"><h3><a href="#var-map-.3EIdentity">map->Identity</a></h3><div class="usage"><code>(map->Identity m__7585__auto__)</code></div><div class="doc"><div class="markdown"><p>Factory function for class cats.monad.identity.Identity, taking a map of keywords to field values.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/identity.cljc#L37">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.monad.maybe.html b/latest/api/cats.monad.maybe.html index d1d1cdd..2c59811 100644 --- a/latest/api/cats.monad.maybe.html +++ b/latest/api/cats.monad.maybe.html @@ -1,10 +1,10 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.monad.maybe documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 current"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.monad.maybe</h2><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p> <pre><code>(require '[cats.monad.maybe :as maybe]) (maybe/just 1) ;; => #<Just [1]> -</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L313">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p> +</code></pre></div></div><div class="public anchor" id="var-cat-maybes"><h3><a href="#var-cat-maybes">cat-maybes</a></h3><div class="usage"><code>(cat-maybes coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection of maybes, return a sequence of the values that the just’s contain.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L261">view source</a></div></div><div class="public anchor" id="var-from-maybe"><h3><a href="#var-from-maybe">from-maybe</a></h3><div class="usage"><code>(from-maybe mv)</code><code>(from-maybe mv default)</code></div><div class="doc"><div class="markdown"><p>Return inner value from maybe monad.</p> <p>This is a specialized version of <code>cats.core/extract</code> for Maybe monad types that allows set up the default value.</p> <p>Let see some examples:</p> <pre><code>(from-maybe (just 1)) @@ -15,4 +15,4 @@ (from-maybe (nothing) 42) ;=> 42 -</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L171">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L146">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L157">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L319">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L280">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L298">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L133">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L152">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L163">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L290">view source</a></div></div></section></section></body></html> \ No newline at end of file +</code></pre></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L117">view source</a></div></div><div class="public anchor" id="var-just"><h3><a href="#var-just">just</a></h3><div class="usage"><code>(just v)</code></div><div class="doc"><div class="markdown"><p>A Just type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L92">view source</a></div></div><div class="public anchor" id="var-just.3F"><h3><a href="#var-just.3F">just?</a></h3><div class="usage"><code>(just? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Just</code> type.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L103">view source</a></div></div><div class="public anchor" id="var-map-.3EJust"><h3><a href="#var-map-.3EJust">map->Just</a></h3><div class="usage"><code>(map->Just m__7585__auto__)</code></div><div class="doc"><div class="markdown"><p>Factory function for class cats.monad.maybe.Just, taking a map of keywords to field values.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L45">view source</a></div></div><div class="public anchor" id="var-map-.3ENothing"><h3><a href="#var-map-.3ENothing">map->Nothing</a></h3><div class="usage"><code>(map->Nothing m__7585__auto__)</code></div><div class="doc"><div class="markdown"><p>Factory function for class cats.monad.maybe.Nothing, taking a map of keywords to field values.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L61">view source</a></div></div><div class="public anchor" id="var-map-maybe"><h3><a href="#var-map-maybe">map-maybe</a></h3><div class="usage"><code>(map-maybe mf coll)</code></div><div class="doc"><div class="markdown"><p>Given a maybe-returning function and a collection, map the function over the collection returning the values contained in the just values of the resulting collection.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L267">view source</a></div></div><div class="public anchor" id="var-maybe"><h3><a href="#var-maybe">maybe</a></h3><h4 class="type">macro</h4><div class="usage"><code>(maybe default m f)</code></div><div class="doc"><div class="markdown"><p>Given a default value, a maybe and a function, return the default if the maybe is a nothing; if its a just, apply the function to the value it contains and return the result.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L227">view source</a></div></div><div class="public anchor" id="var-maybe-.3Eseq"><h3><a href="#var-maybe-.3Eseq">maybe->seq</a></h3><div class="usage"><code>(maybe->seq m)</code></div><div class="doc"><div class="markdown"><p>Given a maybe, return an empty seq if its nothing or a one-element seq with its value if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L246">view source</a></div></div><div class="public anchor" id="var-maybe.3F"><h3><a href="#var-maybe.3F">maybe?</a></h3><div class="usage"><code>(maybe? v)</code></div><div class="doc"><div class="markdown"><p>Return true in case of <code>v</code> is instance of Maybe monad.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L83">view source</a></div></div><div class="public anchor" id="var-nothing"><h3><a href="#var-nothing">nothing</a></h3><div class="usage"><code>(nothing)</code></div><div class="doc"><div class="markdown"><p>A Nothing type constructor.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L98">view source</a></div></div><div class="public anchor" id="var-nothing.3F"><h3><a href="#var-nothing.3F">nothing?</a></h3><div class="usage"><code>(nothing? v)</code></div><div class="doc"><div class="markdown"><p>Returns true if <code>v</code> is an instance of <code>Nothing</code> type or is nil.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L109">view source</a></div></div><div class="public anchor" id="var-seq-.3Emaybe"><h3><a href="#var-seq-.3Emaybe">seq->maybe</a></h3><div class="usage"><code>(seq->maybe coll)</code></div><div class="doc"><div class="markdown"><p>Given a collection, return a nothing if its empty or a just with its first element if its not.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/monad/maybe.cljc#L238">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.protocols.html b/latest/api/cats.protocols.html index cfb5e3c..d08e915 100644 --- a/latest/api/cats.protocols.html +++ b/latest/api/cats.protocols.html @@ -1,4 +1,4 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p> +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.protocols documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch current"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.protocols</h2><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p> <p>NOTE: Functions of this namespace are not intended to be used directly. It is considered internal api.</p></div></div><div class="public anchor" id="var-Applicative"><h3><a href="#var-Applicative">Applicative</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Applicative abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fapply"><h3><a href="#var--fapply">-fapply</a></h3><div class="usage"><code>(-fapply app af av)</code></div><div class="doc"><div class="markdown"><p>Applies the function(s) inside af’s context to the value(s) inside av’s context while preserving the context.</p></div></div></div><div class="public anchor" id="var--pure"><h3><a href="#var--pure">-pure</a></h3><div class="usage"><code>(-pure app v)</code></div><div class="doc"><div class="markdown"><p>Takes any context or monadic value <code>app</code> and any value <code>v</code>, and puts the value <code>v</code> in the most minimal context (normally <code>mempty</code>) of same type of <code>app</code></p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L69">view source</a></div></div><div class="public anchor" id="var-Bifunctor"><h3><a href="#var-Bifunctor">Bifunctor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A ‘Functor’ of two arguments.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--bimap"><h3><a href="#var--bimap">-bimap</a></h3><div class="usage"><code>(-bimap btor f g bv)</code></div><div class="doc"><div class="markdown"><p>Map over both arguments at the same time.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L65">view source</a></div></div><div class="public anchor" id="var-Context"><h3><a href="#var-Context">Context</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A marker protocol for identifying the valid context types.</p></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L32">view source</a></div></div><div class="public anchor" id="var-Contextual"><h3><a href="#var-Contextual">Contextual</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction that establishes a concrete type as a member of a context.</p> <p>A great example is the Maybe monad type Just. It implements this abstraction to establish that Just is part of the Maybe monad.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--get-context"><h3><a href="#var--get-context">-get-context</a></h3><div class="usage"><code>(-get-context _)</code></div><div class="doc"><div class="markdown"><p>Get the context associated with the type.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L35">view source</a></div></div><div class="public anchor" id="var-Extract"><h3><a href="#var-Extract">Extract</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A type class to extract the value from a monad context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--extract"><h3><a href="#var--extract">-extract</a></h3><div class="usage"><code>(-extract mv)</code></div><div class="doc"><div class="markdown"><p>Extract the value from monad context.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L56">view source</a></div></div><div class="public anchor" id="var-Foldable"><h3><a href="#var-Foldable">Foldable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be folded to a summary value.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--foldl"><h3><a href="#var--foldl">-foldl</a></h3><div class="usage"><code>(-foldl fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Left-associative fold of a structure.</p></div></div></div><div class="public anchor" id="var--foldr"><h3><a href="#var--foldr">-foldr</a></h3><div class="usage"><code>(-foldr fctx f z xs)</code></div><div class="doc"><div class="markdown"><p>Right-associative fold of a structure.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L78">view source</a></div></div><div class="public anchor" id="var-Functor"><h3><a href="#var-Functor">Functor</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A data type that can be mapped over without altering its context.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--fmap"><h3><a href="#var--fmap">-fmap</a></h3><div class="usage"><code>(-fmap ftor f fv)</code></div><div class="doc"><div class="markdown"><p>Applies function f to the value(s) inside the context of the functor fv.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L61">view source</a></div></div><div class="public anchor" id="var-Monad"><h3><a href="#var-Monad">Monad</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>The Monad abstraction.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mbind"><h3><a href="#var--mbind">-mbind</a></h3><div class="usage"><code>(-mbind m mv f)</code></div><div class="doc"><div class="markdown"></div></div></div><div class="public anchor" id="var--mreturn"><h3><a href="#var--mreturn">-mreturn</a></h3><div class="usage"><code>(-mreturn m v)</code></div><div class="doc"><div class="markdown"></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L90">view source</a></div></div><div class="public anchor" id="var-MonadPlus"><h3><a href="#var-MonadPlus">MonadPlus</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for Monad that supports the notion of addition.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mplus"><h3><a href="#var--mplus">-mplus</a></h3><div class="usage"><code>(-mplus m mv mv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L100">view source</a></div></div><div class="public anchor" id="var-MonadZero"><h3><a href="#var-MonadZero">MonadZero</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A complement abstraction for monad that supports the notion of an identity element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mzero"><h3><a href="#var--mzero">-mzero</a></h3><div class="usage"><code>(-mzero m)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monadzero.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L95">view source</a></div></div><div class="public anchor" id="var-Monoid"><h3><a href="#var-Monoid">Monoid</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A Semigroup which has an identity element with respect to an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mempty"><h3><a href="#var--mempty">-mempty</a></h3><div class="usage"><code>(-mempty s)</code></div><div class="doc"><div class="markdown"><p>The identity element for the given monoid.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L52">view source</a></div></div><div class="public anchor" id="var-Printable"><h3><a href="#var-Printable">Printable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>An abstraction to make a type printable in a platform independent manner.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--repr"><h3><a href="#var--repr">-repr</a></h3><div class="usage"><code>(-repr _)</code></div><div class="doc"><div class="markdown"><p>Get the repl ready representation of the object.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L43">view source</a></div></div><div class="public anchor" id="var-Semigroup"><h3><a href="#var-Semigroup">Semigroup</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>A structure with an associative binary operation.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--mappend"><h3><a href="#var--mappend">-mappend</a></h3><div class="usage"><code>(-mappend s sv sv')</code></div><div class="doc"><div class="markdown"><p>An associative addition operation.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L48">view source</a></div></div><div class="public anchor" id="var-Traversable"><h3><a href="#var-Traversable">Traversable</a></h3><h4 class="type">protocol</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Abstraction of data structures that can be traversed from left to right performing an action on every element.</p></div></div><div class="members"><h4>members</h4><div class="inner"><div class="public anchor" id="var--traverse"><h3><a href="#var--traverse">-traverse</a></h3><div class="usage"><code>(-traverse tctx f tv)</code></div><div class="doc"><div class="markdown"><p>Map each element to an Applicative, evaluate the applicatives from left to right and collect the results.</p></div></div></div></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/protocols.cljc#L83">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/cats.util.html b/latest/api/cats.util.html index 2829f3f..0e79175 100644 --- a/latest/api/cats.util.html +++ b/latest/api/cats.util.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>cats.util documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2 current"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-docs" id="content"><h2 class="anchor" id="top">cats.util</h2><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="public anchor" id="var-make-printable"><h3><a href="#var-make-printable">make-printable</a></h3><div class="usage"><code>(make-printable klass)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="http://github.com/funcool/cats/blob/master/src/cats/util.cljc#L30">view source</a></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/api/index.html b/latest/api/index.html index 693d6f8..986a5c6 100644 --- a/latest/api/index.html +++ b/latest/api/index.html @@ -1,2 +1,2 @@ <!DOCTYPE html> -<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 2.1.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.1.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-lazy-sequence-context">lazy-sequence-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-context.3F">context?</a> </li><li> <a href="cats.context.html#var-get-current">get-current</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var--.3E.3D">->=</a> </li><li> <a href="cats.core.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-ap">ap</a> </li><li> <a href="cats.core.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.core.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.core.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.core.html#var-as-ap-.3E">as-ap-></a> </li><li> <a href="cats.core.html#var-bimap">bimap</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-left-map">left-map</a> </li><li> <a href="cats.core.html#var-lift-a">lift-a</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-right-map">right-map</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var--.3EDeferredContext">->DeferredContext</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.promise.html">cats.labs.promise</a></h3><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.promise.html#var-promise-context">promise-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.test.html">cats.labs.test</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.test.html#var-applicative-composition">applicative-composition</a> </li><li> <a href="cats.labs.test.html#var-applicative-homomorphism">applicative-homomorphism</a> </li><li> <a href="cats.labs.test.html#var-applicative-identity-law">applicative-identity-law</a> </li><li> <a href="cats.labs.test.html#var-applicative-interchange">applicative-interchange</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-composition">bifunctor-composition</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-first-identity">bifunctor-first-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-second-identity">bifunctor-second-identity</a> </li><li> <a href="cats.labs.test.html#var-first-functor-law">first-functor-law</a> </li><li> <a href="cats.labs.test.html#var-first-monad-law">first-monad-law</a> </li><li> <a href="cats.labs.test.html#var-gen-context">gen-context</a> </li><li> <a href="cats.labs.test.html#var-monadplus-associativity">monadplus-associativity</a> </li><li> <a href="cats.labs.test.html#var-monadzero-bind">monadzero-bind</a> </li><li> <a href="cats.labs.test.html#var-monadzero-identity-element">monadzero-identity-element</a> </li><li> <a href="cats.labs.test.html#var-monoid-identity-element">monoid-identity-element</a> </li><li> <a href="cats.labs.test.html#var-second-functor-law">second-functor-law</a> </li><li> <a href="cats.labs.test.html#var-second-monad-law">second-monad-law</a> </li><li> <a href="cats.labs.test.html#var-semigroup-associativity">semigroup-associativity</a> </li><li> <a href="cats.labs.test.html#var-third-monad-law">third-monad-law</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either">either</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li><li> <a href="cats.monad.either.html#var-try-either">try-either</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Bifunctor">Bifunctor</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file +<html><head><meta charset="UTF-8"><link href="css/default.css" rel="stylesheet" type="text/css"><title>Cats 2.2.0 API documentation</title></head><body><header><section class="title"><h1><a href="index.html">Cats Api Documentation</a></h1></section><small>Version: 2.2.0</small></header><section class="container"><div class="sidebar" id="namespaces"><h3><a href="index.html"><span class="inner">Namespaces</span></a></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cats</span></div></div></li><li class="depth-2 branch"><a href="cats.builtin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>builtin</span></div></a></li><li class="depth-2 branch"><a href="cats.context.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>context</span></div></a></li><li class="depth-2 branch"><a href="cats.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="cats.data.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>labs</span></div></div></li><li class="depth-3 branch"><a href="cats.labs.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.manifold.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manifold</span></div></a></li><li class="depth-3 branch"><a href="cats.labs.promise.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>promise</span></div></a></li><li class="depth-3"><a href="cats.labs.test.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>test</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>monad</span></div></div></li><li class="depth-3 branch"><a href="cats.monad.either.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>either</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.exception.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exception</span></div></a></li><li class="depth-3 branch"><a href="cats.monad.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3"><a href="cats.monad.maybe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>maybe</span></div></a></li><li class="depth-2 branch"><a href="cats.protocols.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>protocols</span></div></a></li><li class="depth-2"><a href="cats.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><section class="namespace-index" id="content"><section class="title-container"><h2>Cats</h2><div class="doc"><p>Category Theory abstractions for Clojure</p></div></section><div class="namespace"><h3><a href="cats.builtin.html">cats.builtin</a></h3><div class="doc"><div class="markdown"><p>Clojure(Script) built-in types extensions.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.builtin.html#var-all-monoid">all-monoid</a> </li><li> <a href="cats.builtin.html#var-any-monoid">any-monoid</a> </li><li> <a href="cats.builtin.html#var-function-context">function-context</a> </li><li> <a href="cats.builtin.html#var-lazy-sequence-context">lazy-sequence-context</a> </li><li> <a href="cats.builtin.html#var-map-context">map-context</a> </li><li> <a href="cats.builtin.html#var-prod-monoid">prod-monoid</a> </li><li> <a href="cats.builtin.html#var-range-context">range-context</a> </li><li> <a href="cats.builtin.html#var-sequence-context">sequence-context</a> </li><li> <a href="cats.builtin.html#var-set-context">set-context</a> </li><li> <a href="cats.builtin.html#var-string-monoid">string-monoid</a> </li><li> <a href="cats.builtin.html#var-sum-monoid">sum-monoid</a> </li><li> <a href="cats.builtin.html#var-vector-context">vector-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.context.html">cats.context</a></h3><div class="doc"><div class="markdown"><p>A cats context management.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.context.html#var-*context*">*context*</a> </li><li> <a href="cats.context.html#var-*override*">*override*</a> </li><li> <a href="cats.context.html#var-context.3F">context?</a> </li><li> <a href="cats.context.html#var-get-current">get-current</a> </li><li> <a href="cats.context.html#var-with-context">with-context</a> </li><li> <a href="cats.context.html#var-with-context-override">with-context-override</a> </li><li> <a href="cats.context.html#var-with-monad">with-monad</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.core.html">cats.core</a></h3><div class="doc"><div class="markdown"><p>Category Theory abstractions for Clojure</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.core.html#var--.3E.3D">->=</a> </li><li> <a href="cats.core.html#var--.3E.3E.3D">->>=</a> </li><li> <a href="cats.core.html#var-.3C.24.3E"><$></a> </li><li> <a href="cats.core.html#var-.3C*.3E"><*></a> </li><li> <a href="cats.core.html#var-.3C.3D.3C"><=<</a> </li><li> <a href="cats.core.html#var-.3C.3E"><></a> </li><li> <a href="cats.core.html#var-.3D.3C.3C">=<<</a> </li><li> <a href="cats.core.html#var-.3E.3D.3E">>=></a> </li><li> <a href="cats.core.html#var-.3E.3E">>></a> </li><li> <a href="cats.core.html#var-.3E.3E.3D">>>=</a> </li><li> <a href="cats.core.html#var-alet">alet</a> </li><li> <a href="cats.core.html#var-ap">ap</a> </li><li> <a href="cats.core.html#var-ap-.3E">ap-></a> </li><li> <a href="cats.core.html#var-ap-.3E.3E">ap->></a> </li><li> <a href="cats.core.html#var-as-.3E.3D">as->=</a> </li><li> <a href="cats.core.html#var-as-ap-.3E">as-ap-></a> </li><li> <a href="cats.core.html#var-bimap">bimap</a> </li><li> <a href="cats.core.html#var-bind">bind</a> </li><li> <a href="cats.core.html#var-curry">curry</a> </li><li> <a href="cats.core.html#var-curry*">curry*</a> </li><li> <a href="cats.core.html#var-curry-lift-m">curry-lift-m</a> </li><li> <a href="cats.core.html#var-extract">extract</a> </li><li> <a href="cats.core.html#var-fapply">fapply</a> </li><li> <a href="cats.core.html#var-filter">filter</a> </li><li> <a href="cats.core.html#var-fmap">fmap</a> </li><li> <a href="cats.core.html#var-foldl">foldl</a> </li><li> <a href="cats.core.html#var-foldm">foldm</a> </li><li> <a href="cats.core.html#var-foldr">foldr</a> </li><li> <a href="cats.core.html#var-forseq">forseq</a> </li><li> <a href="cats.core.html#var-guard">guard</a> </li><li> <a href="cats.core.html#var-join">join</a> </li><li> <a href="cats.core.html#var-left-map">left-map</a> </li><li> <a href="cats.core.html#var-lift-a">lift-a</a> </li><li> <a href="cats.core.html#var-lift-m">lift-m</a> </li><li> <a href="cats.core.html#var-mappend">mappend</a> </li><li> <a href="cats.core.html#var-mapseq">mapseq</a> </li><li> <a href="cats.core.html#var-mempty">mempty</a> </li><li> <a href="cats.core.html#var-mlet">mlet</a> </li><li> <a href="cats.core.html#var-mplus">mplus</a> </li><li> <a href="cats.core.html#var-mzero">mzero</a> </li><li> <a href="cats.core.html#var-pure">pure</a> </li><li> <a href="cats.core.html#var-return">return</a> </li><li> <a href="cats.core.html#var-right-map">right-map</a> </li><li> <a href="cats.core.html#var-sequence">sequence</a> </li><li> <a href="cats.core.html#var-traverse">traverse</a> </li><li> <a href="cats.core.html#var-unless">unless</a> </li><li> <a href="cats.core.html#var-when">when</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.data.html">cats.data</a></h3><div class="doc"><div class="markdown"><p>Data structures that are used in various places of the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.data.html#var-pair">pair</a> </li><li> <a href="cats.data.html#var-pair-monoid">pair-monoid</a> </li><li> <a href="cats.data.html#var-pair.3F">pair?</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.channel.html">cats.labs.channel</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.channel.html#var-channel.3F">channel?</a> </li><li> <a href="cats.labs.channel.html#var-with-value">with-value</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.manifold.html">cats.labs.manifold</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.manifold.html#var--.3EDeferredContext">->DeferredContext</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context">deferred-context</a> </li><li> <a href="cats.labs.manifold.html#var-deferred-context*">deferred-context*</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.promise.html">cats.labs.promise</a></h3><div class="doc"><div class="markdown"><p>A promise monad that uses promesa library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.promise.html#var-promise-context">promise-context</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.labs.test.html">cats.labs.test</a></h3><div class="doc"><div class="markdown"></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.labs.test.html#var-applicative-composition">applicative-composition</a> </li><li> <a href="cats.labs.test.html#var-applicative-homomorphism">applicative-homomorphism</a> </li><li> <a href="cats.labs.test.html#var-applicative-identity-law">applicative-identity-law</a> </li><li> <a href="cats.labs.test.html#var-applicative-interchange">applicative-interchange</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-bimap-identity">bifunctor-bimap-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-composition">bifunctor-composition</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-first-identity">bifunctor-first-identity</a> </li><li> <a href="cats.labs.test.html#var-bifunctor-second-identity">bifunctor-second-identity</a> </li><li> <a href="cats.labs.test.html#var-first-functor-law">first-functor-law</a> </li><li> <a href="cats.labs.test.html#var-first-monad-law">first-monad-law</a> </li><li> <a href="cats.labs.test.html#var-gen-context">gen-context</a> </li><li> <a href="cats.labs.test.html#var-monadplus-associativity">monadplus-associativity</a> </li><li> <a href="cats.labs.test.html#var-monadzero-bind">monadzero-bind</a> </li><li> <a href="cats.labs.test.html#var-monadzero-identity-element">monadzero-identity-element</a> </li><li> <a href="cats.labs.test.html#var-monoid-identity-element">monoid-identity-element</a> </li><li> <a href="cats.labs.test.html#var-second-functor-law">second-functor-law</a> </li><li> <a href="cats.labs.test.html#var-second-monad-law">second-monad-law</a> </li><li> <a href="cats.labs.test.html#var-semigroup-associativity">semigroup-associativity</a> </li><li> <a href="cats.labs.test.html#var-third-monad-law">third-monad-law</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.either.html">cats.monad.either</a></h3><div class="doc"><div class="markdown"><p>The Either monad implementation and helper functions for working with either related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.either.html#var-branch">branch</a> </li><li> <a href="cats.monad.either.html#var-branch-left">branch-left</a> </li><li> <a href="cats.monad.either.html#var-branch-right">branch-right</a> </li><li> <a href="cats.monad.either.html#var-either">either</a> </li><li> <a href="cats.monad.either.html#var-either.3F">either?</a> </li><li> <a href="cats.monad.either.html#var-first-left">first-left</a> </li><li> <a href="cats.monad.either.html#var-first-right">first-right</a> </li><li> <a href="cats.monad.either.html#var-invert">invert</a> </li><li> <a href="cats.monad.either.html#var-left">left</a> </li><li> <a href="cats.monad.either.html#var-left.3F">left?</a> </li><li> <a href="cats.monad.either.html#var-lefts">lefts</a> </li><li> <a href="cats.monad.either.html#var-map-.3ELeft">map->Left</a> </li><li> <a href="cats.monad.either.html#var-map-.3ERight">map->Right</a> </li><li> <a href="cats.monad.either.html#var-right">right</a> </li><li> <a href="cats.monad.either.html#var-right.3F">right?</a> </li><li> <a href="cats.monad.either.html#var-rights">rights</a> </li><li> <a href="cats.monad.either.html#var-try-either">try-either</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.exception.html">cats.monad.exception</a></h3><div class="doc"><div class="markdown"><p>The Exception monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.exception.html#var-exception.3F">exception?</a> </li><li> <a href="cats.monad.exception.html#var-extract">extract</a> </li><li> <a href="cats.monad.exception.html#var-failure">failure</a> </li><li> <a href="cats.monad.exception.html#var-failure.3F">failure?</a> </li><li> <a href="cats.monad.exception.html#var-map-.3EFailure">map->Failure</a> </li><li> <a href="cats.monad.exception.html#var-map-.3ESuccess">map->Success</a> </li><li> <a href="cats.monad.exception.html#var-success">success</a> </li><li> <a href="cats.monad.exception.html#var-success.3F">success?</a> </li><li> <a href="cats.monad.exception.html#var-throw-exception">throw-exception</a> </li><li> <a href="cats.monad.exception.html#var-throwable.3F">throwable?</a> </li><li> <a href="cats.monad.exception.html#var-try-on">try-on</a> </li><li> <a href="cats.monad.exception.html#var-try-or-else">try-or-else</a> </li><li> <a href="cats.monad.exception.html#var-try-or-recover">try-or-recover</a> </li><li> <a href="cats.monad.exception.html#var-wrap">wrap</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.identity.html">cats.monad.identity</a></h3><div class="doc"><div class="markdown"><p>The Identity Monad.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.identity.html#var-identity">identity</a> </li><li> <a href="cats.monad.identity.html#var-identity.3F">identity?</a> </li><li> <a href="cats.monad.identity.html#var-map-.3EIdentity">map->Identity</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.monad.maybe.html">cats.monad.maybe</a></h3><div class="doc"><div class="markdown"><p>The Maybe monad implementation and helpers functions for working with maybe related types.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.monad.maybe.html#var-cat-maybes">cat-maybes</a> </li><li> <a href="cats.monad.maybe.html#var-from-maybe">from-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-just">just</a> </li><li> <a href="cats.monad.maybe.html#var-just.3F">just?</a> </li><li> <a href="cats.monad.maybe.html#var-map-.3EJust">map->Just</a> </li><li> <a href="cats.monad.maybe.html#var-map-.3ENothing">map->Nothing</a> </li><li> <a href="cats.monad.maybe.html#var-map-maybe">map-maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe">maybe</a> </li><li> <a href="cats.monad.maybe.html#var-maybe-.3Eseq">maybe->seq</a> </li><li> <a href="cats.monad.maybe.html#var-maybe.3F">maybe?</a> </li><li> <a href="cats.monad.maybe.html#var-nothing">nothing</a> </li><li> <a href="cats.monad.maybe.html#var-nothing.3F">nothing?</a> </li><li> <a href="cats.monad.maybe.html#var-seq-.3Emaybe">seq->maybe</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.protocols.html">cats.protocols</a></h3><div class="doc"><div class="markdown"><p>A collection of protocols upon which the cats abstractions are built.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.protocols.html#var-Applicative">Applicative</a> </li><li> <a href="cats.protocols.html#var-Bifunctor">Bifunctor</a> </li><li> <a href="cats.protocols.html#var-Context">Context</a> </li><li> <a href="cats.protocols.html#var-Contextual">Contextual</a> </li><li> <a href="cats.protocols.html#var-Extract">Extract</a> </li><li> <a href="cats.protocols.html#var-Foldable">Foldable</a> </li><li> <a href="cats.protocols.html#var-Functor">Functor</a> </li><li> <a href="cats.protocols.html#var-Monad">Monad</a> </li><li> <a href="cats.protocols.html#var-MonadPlus">MonadPlus</a> </li><li> <a href="cats.protocols.html#var-MonadZero">MonadZero</a> </li><li> <a href="cats.protocols.html#var-Monoid">Monoid</a> </li><li> <a href="cats.protocols.html#var-Printable">Printable</a> </li><li> <a href="cats.protocols.html#var-Semigroup">Semigroup</a> </li><li> <a href="cats.protocols.html#var-Traversable">Traversable</a> </li></ul></div></div><div class="namespace"><h3><a href="cats.util.html">cats.util</a></h3><div class="doc"><div class="markdown"><p>A collection of utils that used around the library.</p></div></div><div class="index"><p>Public variables and functions:</p><ul><li> <a href="cats.util.html#var-make-printable">make-printable</a> </li></ul></div></div></section></section></body></html> \ No newline at end of file diff --git a/latest/index.html b/latest/index.html index 0fb5ded..b03e65c 100644 --- a/latest/index.html +++ b/latest/index.html @@ -4,8 +4,8 @@ <meta charset="UTF-8"> <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<meta name="generator" content="Asciidoctor 1.5.5"> -<meta name="author" content="Andrey Antukh & Alejandro Gómez"> +<meta name="generator" content="Asciidoctor 1.5.6.1"> +<meta name="author" content="Andrey Antukh &amp;amp; Alejandro Gómez"> <title>Cats Documentation</title> <style> .listingblock .pygments .hll { background-color: #ffffcc } @@ -85,8 +85,8 @@ <div id="header"> <h1>Cats Documentation</h1> <div class="details"> -<span id="author" class="author">Andrey Antukh & Alejandro Gómez</span><br> -<span id="revdate">2.1.0</span> +<span id="author" class="author">Andrey Antukh &amp;amp; Alejandro Gómez</span><br> +<span id="revdate">2.2.0</span> </div> <div id="toc" class="toc2"> <div id="toctitle">Table of Contents</div> @@ -205,7 +205,7 @@ <h2 id="install"><a class="link" href="#install">Install</a></h2> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"2.1.0"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">[</span><span class="tok-nv">funcool/cats</span> <span class="tok-s">"2.2.0"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -235,7 +235,7 @@ <h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]</span> <span class="tok-p">[</span><span class="tok-mi">4</span> <span class="tok-mi">5</span> <span class="tok-mi">6</span><span class="tok-p">])</span> @@ -248,7 +248,7 @@ <h3 id="semigroup"><a class="link" href="#semigroup">Semigroup</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> @@ -270,7 +270,7 @@ <h3 id="monoid"><a class="link" href="#monoid">Monoid</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> @@ -291,7 +291,7 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <div class="listingblock"> <div class="title">Signature of <strong>fmap</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">fmap</span> <span class="tok-p">[</span><span class="tok-nv">f</span> <span class="tok-nv">fv</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> @@ -308,7 +308,7 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <div class="listingblock"> <div class="title">One good example of a functor is the <strong>Maybe</strong> type:</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Just 2></span></code></pre> @@ -324,7 +324,7 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <div class="listingblock"> <div class="title">Example using fmap over <strong>just</strong> instance.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just 2></span></code></pre> @@ -341,7 +341,7 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <div class="listingblock"> <div class="title">Example using fmap over <strong>nothing</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">(</span><span class="tok-nf">nothing</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Nothing></span></code></pre> </div> </div> @@ -356,7 +356,7 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> <div class="listingblock"> <div class="title">Example using fmap over <strong>vector</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">])</span> <span class="tok-c1">;; => [2 3 4]</span></code></pre> @@ -368,7 +368,7 @@ <h3 id="functor"><a class="link" href="#functor">Functor</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">type</span> <span class="tok-p">(</span><span class="tok-nb">map inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span><span class="tok-p">]))</span> <span class="tok-c1">;; => clojure.lang.LazySeq (cljs.core/LazySeq in ClojureScript)</span></code></pre> </div> </div> @@ -392,7 +392,7 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> <div class="listingblock"> <div class="title">Signature of <strong>fapply</strong> function</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">[</span><span class="tok-nv">af</span> <span class="tok-nv">av</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="admonitionblock note"> @@ -421,7 +421,7 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">))</span> @@ -438,7 +438,7 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">make-greeter</span> <span class="tok-p">[</span><span class="tok-o">^</span><span class="tok-nv">String</span> <span class="tok-nv">lang</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">condp</span> <span class="tok-nb">= </span><span class="tok-nv">lang</span> <span class="tok-s">"es"</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">name</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">str </span><span class="tok-s">"Hola "</span> <span class="tok-nv">name</span><span class="tok-p">)))</span> @@ -453,7 +453,7 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"es"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just "Hola Alex"></span> <span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-nf">make-greeter</span> <span class="tok-s">"en"</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-s">"Alex"</span><span class="tok-p">))</span> @@ -472,7 +472,7 @@ <h3 id="applicative"><a class="link" href="#applicative">Applicative</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">pure</span> <span class="tok-nv">maybe/maybe-monad</span> <span class="tok-mi">5</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Just 5></span></code></pre> @@ -496,7 +496,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">foldl</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">foldl</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => 15</span></code></pre> </div> </div> @@ -505,7 +505,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">reduce </span><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nb">reduce </span><span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">acc</span> <span class="tok-nv">v</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => 15</span></code></pre> </div> </div> @@ -514,7 +514,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">foldr</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span> <span class="tok-nv">wc</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">v</span> <span class="tok-nv">wc</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">foldr</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span> <span class="tok-nv">wc</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">v</span> <span class="tok-nv">wc</span><span class="tok-p">))</span> <span class="tok-mi">0</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">])</span> <span class="tok-c1">;; => 15</span></code></pre> </div> </div> @@ -530,7 +530,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">((((acc⊕1)⊕2)⊕3)⊕4)⊕5</code></pre> +<pre class="pygments highlight"><code data-lang="text"><span></span>((((acc⊕1)⊕2)⊕3)⊕4)⊕5</code></pre> </div> </div> <div class="paragraph"> @@ -538,7 +538,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">1⊕(2⊕(3⊕(4⊕(5⊕(wc)))))</code></pre> +<pre class="pygments highlight"><code data-lang="text"><span></span>1⊕(2⊕(3⊕(4⊕(5⊕(wc)))))</code></pre> </div> </div> <div class="paragraph"> @@ -549,7 +549,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/foldr</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">cons </span><span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">%1</span><span class="tok-p">)</span> <span class="tok-nv">%2</span><span class="tok-p">)</span> <span class="tok-o">'</span><span class="tok-p">()</span> <span class="tok-p">(</span><span class="tok-nb">range </span><span class="tok-mi">100000</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/foldr</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nb">cons </span><span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">%1</span><span class="tok-p">)</span> <span class="tok-nv">%2</span><span class="tok-p">)</span> <span class="tok-o">'</span><span class="tok-p">()</span> <span class="tok-p">(</span><span class="tok-nb">range </span><span class="tok-mi">100000</span><span class="tok-p">))</span> <span class="tok-c1">;; => StackOverflowError</span></code></pre> </div> </div> @@ -560,7 +560,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/foldl</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">%1</span> <span class="tok-nv">%2</span><span class="tok-p">))</span> <span class="tok-mi">1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/foldl</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">%1</span> <span class="tok-nv">%2</span><span class="tok-p">))</span> <span class="tok-mi">1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-c1">;; => #<Just 2></span> <span class="tok-p">(</span><span class="tok-nf">m/foldl</span> <span class="tok-o">#</span><span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">%1</span> <span class="tok-nv">%2</span><span class="tok-p">))</span> <span class="tok-mi">1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> @@ -582,7 +582,7 @@ <h3 id="foldable"><a class="link" href="#foldable">Foldable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">m-div</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">m-div</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-p">(</span><span class="tok-nb">zero? </span><span class="tok-nv">y</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> @@ -621,7 +621,7 @@ <h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">just-if-even</span> <span class="tok-p">[</span><span class="tok-nv">n</span><span class="tok-p">]</span> @@ -637,7 +637,7 @@ <h3 id="traversable"><a class="link" href="#traversable">Traversable</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.context</span> <span class="tok-ss">:as</span> <span class="tok-nv">ctx</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">ctx/with-context</span> <span class="tok-nv">maybe/context</span> @@ -674,7 +674,7 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="listingblock"> <div class="title">Bind function signature.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">[</span><span class="tok-nv">mv</span> <span class="tok-nv">f</span><span class="tok-p">])</span></code></pre> </div> </div> <div class="paragraph"> @@ -685,7 +685,7 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="listingblock"> <div class="title">Example usage of the bind higher-order function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> <span class="tok-c1">;; => #<Just 2></span></code></pre> </div> @@ -700,7 +700,7 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="listingblock"> <div class="title">Usage of return function in bind context.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">v</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">v</span><span class="tok-p">))))</span> <span class="tok-c1">;; => #<Just 2></span></code></pre> @@ -718,7 +718,7 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="listingblock"> <div class="title">Composability example of bind function.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> @@ -732,7 +732,7 @@ <h3 id="monad"><a class="link" href="#monad">Monad</a></h3> <div class="listingblock"> <div class="title">Previous example but using <strong>mlet</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">b</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> </div> @@ -751,7 +751,7 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mzero</span> <span class="tok-nv">maybe/maybe-monad</span><span class="tok-p">)</span> @@ -764,7 +764,7 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> @@ -784,7 +784,7 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">guard</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">guard</span> <span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-k">if </span><span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> @@ -796,7 +796,7 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> @@ -812,7 +812,7 @@ <h3 id="monadzero"><a class="link" href="#monadzero">MonadZero</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> @@ -835,7 +835,7 @@ <h3 id="monadplus"><a class="link" href="#monadplus">MonadPlus</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mplus</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> @@ -887,7 +887,7 @@ <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <div class="listingblock"> <div class="title">Example creating instances of <code>Just</code> and <code>Nothing</code> types:</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Just 1></span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">)</span> @@ -912,7 +912,7 @@ <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <div class="listingblock"> <div class="title">Example using <strong>from-maybe</strong> to extract values wrapped by <strong>just</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-c1">;; => 1</span> <span class="tok-p">(</span><span class="tok-nf">maybe/from-maybe</span> <span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> @@ -934,7 +934,7 @@ <h3 id="maybe"><a class="link" href="#maybe">Maybe</a></h3> <div class="listingblock"> <div class="title">Example using <strong>deref</strong> to extract values wrapped by <strong>just</strong>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">deref </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nb">deref </span><span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">))</span> <span class="tok-c1">;; => 1</span> <span class="tok-p">(</span><span class="tok-nb">deref </span><span class="tok-p">(</span><span class="tok-nf">maybe/nothing</span><span class="tok-p">))</span> @@ -964,7 +964,7 @@ <h3 id="either"><a class="link" href="#either">Either</a></h3> <div class="listingblock"> <div class="title">Usage example of <strong>Either</strong> constructors.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.either</span> <span class="tok-ss">:refer</span> <span class="tok-ss">:all</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nb">right </span><span class="tok-ss">:valid-value</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Right [:valid-value :right]></span> @@ -1019,7 +1019,7 @@ <h3 id="exception"><a class="link" href="#exception">Exception</a></h3> <div class="listingblock"> <div class="title">Usage example of <strong>try-on</strong> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.exception</span> <span class="tok-ss">:as</span> <span class="tok-nv">exc</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [1]></span> @@ -1036,14 +1036,14 @@ <h3 id="exception"><a class="link" href="#exception">Exception</a></h3> <div class="listingblock"> <div class="title">Usage example of <code>try-or-else</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">exc/try-or-else</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-mi">2</span><span class="tok-p">)</span> <span class="tok-c1">;; => #<Success [2]></span></code></pre> </div> </div> <div class="listingblock"> <div class="title">Usage example of <code>try-or-recover</code> macro.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">exc/try-or-recover</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">e</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">cond</span> <span class="tok-p">(</span><span class="tok-nb">instance? </span><span class="tok-nv">NullPointerException</span> <span class="tok-nv">e</span><span class="tok-p">)</span> <span class="tok-mi">0</span> @@ -1063,7 +1063,7 @@ <h3 id="exception"><a class="link" href="#exception">Exception</a></h3> <div class="listingblock"> <div class="title">Example dereferencing a failure instance</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">f</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)))</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">f</span> <span class="tok-p">(</span><span class="tok-nf">exc/try-on</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-mi">1</span> <span class="tok-nv">nil</span><span class="tok-p">)))</span> <span class="tok-o">@</span><span class="tok-nv">f</span> <span class="tok-c1">;; => NullPointerException clojure.lang.Numbers.ops (Numbers.java:961)</span></code></pre> @@ -1078,7 +1078,7 @@ <h3 id="built-in-types"><a class="link" href="#built-in-types">Built in types</a </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/fmap</span> <span class="tok-nb">inc </span><span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">])</span> @@ -1094,7 +1094,7 @@ <h4 id="nil"><a class="link" href="#nil">nil</a></h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> @@ -1116,7 +1116,7 @@ <h4 id="vector"><a class="link" href="#vector">Vector</a></h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nb">for </span><span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nb">for </span><span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> <span class="tok-nv">y</span> <span class="tok-p">[</span><span class="tok-mi">3</span> <span class="tok-mi">4</span> <span class="tok-mi">5</span><span class="tok-p">]]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">))</span> <span class="tok-c1">;; => (4 5 6 5 6 7)</span></code></pre> @@ -1127,7 +1127,7 @@ <h4 id="vector"><a class="link" href="#vector">Vector</a></h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">]</span> @@ -1159,7 +1159,7 @@ <h4 id="lazy-sequences"><a class="link" href="#lazy-sequences">Lazy sequences</a </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">lazy-seq</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span><span class="tok-p">])</span> @@ -1176,7 +1176,7 @@ <h4 id="set"><a class="link" href="#set">Set</a></h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/pure</span> <span class="tok-nv">set-context</span> <span class="tok-mi">42</span><span class="tok-p">)</span> @@ -1200,7 +1200,7 @@ <h4 id="map"><a class="link" href="#map">Map</a></h4> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">use</span> <span class="tok-ss">'cats.builtin</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mappend</span> <span class="tok-p">{</span><span class="tok-ss">:a</span> <span class="tok-s">"A"</span><span class="tok-p">}</span> <span class="tok-p">{</span><span class="tok-ss">:b</span> <span class="tok-s">"B"</span><span class="tok-p">})</span> @@ -1237,7 +1237,7 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))</span></code></pre> </div> @@ -1247,7 +1247,7 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">m/bind</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> @@ -1270,7 +1270,7 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">a</span><span class="tok-p">))</span> <span class="tok-ss">:let</span> <span class="tok-p">[</span><span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)]]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">* </span><span class="tok-nv">z</span> <span class="tok-mi">2</span><span class="tok-p">)))</span></code></pre> @@ -1283,7 +1283,7 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:as</span> <span class="tok-nv">maybe</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">maybe/just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> @@ -1298,7 +1298,7 @@ <h3 id="mlet"><a class="link" href="#mlet">mlet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.builtin</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">[</span><span class="tok-mi">1</span> <span class="tok-mi">2</span> <span class="tok-mi">3</span> <span class="tok-mi">4</span><span class="tok-p">]</span> @@ -1316,7 +1316,7 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">bind</span> <span class="tok-nv">return</span><span class="tok-p">]])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">bind</span> <span class="tok-nv">return</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-nf">bind</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> @@ -1339,7 +1339,7 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">mlet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">41</span><span class="tok-p">)]</span> <span class="tok-p">(</span><span class="tok-nf">return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">)))</span> <span class="tok-c1">;; => #<Just 42></span></code></pre> @@ -1350,7 +1350,7 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">alet</span><span class="tok-p">]])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">alet</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-nf">alet</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">1</span><span class="tok-p">)</span> <span class="tok-nv">b</span> <span class="tok-p">(</span><span class="tok-nf">just</span> <span class="tok-mi">41</span><span class="tok-p">)]</span> @@ -1364,7 +1364,7 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">fapply</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">a</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-k">fn </span><span class="tok-p">[</span><span class="tok-nv">b</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nf">do</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span><span class="tok-p">))))</span> @@ -1389,7 +1389,7 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.promise</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">promesa.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">p</span><span class="tok-p">])</span> @@ -1425,7 +1425,7 @@ <h3 id="alet"><a class="link" href="#alet">alet</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">time</span> <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">42</span><span class="tok-p">)</span> <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-mi">41</span><span class="tok-p">)</span> <span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nf">sleep-promise</span> <span class="tok-p">(</span><span class="tok-nb">inc </span><span class="tok-nv">x</span><span class="tok-p">))</span> @@ -1462,7 +1462,7 @@ <h3 id="curry"><a class="link" href="#curry">curry</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">add</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">b</span> <span class="tok-nv">c</span><span class="tok-p">]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">a</span> <span class="tok-nv">b</span> <span class="tok-nv">c</span><span class="tok-p">))</span> @@ -1493,7 +1493,7 @@ <h3 id="curry"><a class="link" href="#curry">curry</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">curried+</span> <span class="tok-p">(</span><span class="tok-nf">m/curry</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> @@ -1517,7 +1517,7 @@ <h3 id="curry"><a class="link" href="#curry">curry</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">curried+</span> <span class="tok-p">(</span><span class="tok-nf">m/curry</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> @@ -1549,7 +1549,7 @@ <h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">add</span> <span class="tok-p">[</span><span class="tok-nv">a</span> <span class="tok-nv">b</span> <span class="tok-nv">c</span><span class="tok-p">]</span> @@ -1573,7 +1573,7 @@ <h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">add-m</span> <span class="tok-p">(</span><span class="tok-nf">m/lift-m</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> @@ -1595,7 +1595,7 @@ <h3 id="lift-m"><a class="link" href="#lift-m">lift-m</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.monad.maybe</span> <span class="tok-ss">:refer</span> <span class="tok-p">[</span><span class="tok-nv">just</span> <span class="tok-nv">nothing</span><span class="tok-p">]])</span> <span class="tok-p">(</span><span class="tok-k">def </span><span class="tok-nv">curried-add-m</span> <span class="tok-p">(</span><span class="tok-nf">m/curry-lift-m</span> <span class="tok-mi">3</span> <span class="tok-nv">+</span><span class="tok-p">))</span> @@ -1638,7 +1638,7 @@ <h3 id="test-check"><a class="link" href="#test-check">test.check</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.core</span> <span class="tok-ss">:as</span> <span class="tok-nv">m</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.test</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">clojure.test.check.generators</span> <span class="tok-ss">:as</span> <span class="tok-nv">gen</span><span class="tok-p">])</span> @@ -1685,7 +1685,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.2.385"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">[</span><span class="tok-nv">org.clojure/core.async</span> <span class="tok-s">"0.2.385"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -1696,7 +1696,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">clojure.core.async</span> <span class="tok-ss">:as</span> <span class="tok-nv">a</span><span class="tok-p">])</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">clojure.core.async</span> <span class="tok-ss">:as</span> <span class="tok-nv">a</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.channel</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">async-call</span> @@ -1715,7 +1715,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">time</span> <span class="tok-p">(</span><span class="tok-nf"><!!</span> <span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">200</span><span class="tok-p">)</span> <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> @@ -1758,7 +1758,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">time</span> <span class="tok-p">(</span><span class="tok-nf">a/<!!</span> <span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)</span> <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> @@ -1798,7 +1798,7 @@ <h3 id="channel"><a class="link" href="#channel">Channel</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">time</span> <span class="tok-p">(</span><span class="tok-nf">a/<!!</span> <span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">120</span><span class="tok-p">)</span> <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">130</span><span class="tok-p">)</span> <span class="tok-nv">z</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-p">(</span><span class="tok-nb">- </span><span class="tok-nv">x</span> <span class="tok-mi">100</span><span class="tok-p">))</span> @@ -1834,7 +1834,7 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">[</span><span class="tok-nv">manifold</span> <span class="tok-s">"0.1.1"</span><span class="tok-p">]</span></code></pre> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">[</span><span class="tok-nv">manifold</span> <span class="tok-s">"0.1.1"</span><span class="tok-p">]</span></code></pre> </div> </div> <div class="paragraph"> @@ -1849,7 +1849,7 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.manifold</span> <span class="tok-ss">:as</span> <span class="tok-nv">mf</span><span class="tok-p">]</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">require</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">cats.labs.manifold</span> <span class="tok-ss">:as</span> <span class="tok-nv">mf</span><span class="tok-p">]</span> <span class="tok-o">'</span><span class="tok-p">[</span><span class="tok-nv">manifold.deferred</span> <span class="tok-ss">:as</span> <span class="tok-nv">d</span><span class="tok-p">])</span> <span class="tok-p">(</span><span class="tok-kd">defn </span><span class="tok-nv">async-call</span> @@ -1869,7 +1869,7 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De <div class="listingblock"> <div class="title">Example using manifold deferred with <code>mlet</code>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">time</span> <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/mlet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">200</span><span class="tok-p">)</span> <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> <span class="tok-p">(</span><span class="tok-nf">m/return</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> @@ -1889,7 +1889,7 @@ <h3 id="manifold-deferred"><a class="link" href="#manifold-deferred">Manifold De <div class="listingblock"> <div class="title">Example using manifold deferred with <code>alet</code>.</div> <div class="content"> -<pre class="pygments highlight"><code data-lang="clojure"><span class="tok-p">(</span><span class="tok-nf">time</span> +<pre class="pygments highlight"><code data-lang="clojure"><span></span><span class="tok-p">(</span><span class="tok-nf">time</span> <span class="tok-o">@</span><span class="tok-p">(</span><span class="tok-nf">m/alet</span> <span class="tok-p">[</span><span class="tok-nv">x</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)</span> <span class="tok-nv">y</span> <span class="tok-p">(</span><span class="tok-nf">async-call</span> <span class="tok-mi">100</span><span class="tok-p">)]</span> <span class="tok-p">(</span><span class="tok-nb">+ </span><span class="tok-nv">x</span> <span class="tok-nv">y</span><span class="tok-p">)))))</span> @@ -1917,7 +1917,7 @@ <h2 id="complementary-libraries"><a class="link" href="#complementary-libraries" <p>Concurrent data fetching: <a href="https://github.com/funcool/urania" class="bare">https://github.com/funcool/urania</a></p> </li> <li> -<p>Patter matching for the Cats' types: <a href="https://github.com/zalando/cats.match" class="bare">https://github.com/zalando/cats.match</a></p> +<p>Pattern matching for the Cats' types: <a href="https://github.com/zalando/cats.match" class="bare">https://github.com/zalando/cats.match</a></p> </li> </ul> </div> @@ -2018,7 +2018,7 @@ <h3 id="editor-integration"><a class="link" href="#editor-integration">Editor in </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="elisp"><span class="tok-p">(</span><span class="tok-nb">require</span> <span class="tok-ss">'clojure-mode</span><span class="tok-p">)</span> +<pre class="pygments highlight"><code data-lang="elisp"><span></span><span class="tok-p">(</span><span class="tok-nb">require</span> <span class="tok-ss">'clojure-mode</span><span class="tok-p">)</span> <span class="tok-p">(</span><span class="tok-nv">define-clojure-indent</span> <span class="tok-p">(</span><span class="tok-nv">alet</span> <span class="tok-ss">'defun</span><span class="tok-p">)</span> @@ -2037,7 +2037,7 @@ <h3 id="source-code"><a class="link" href="#source-code">Source Code</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">git clone https://github.com/funcool/cats</code></pre> +<pre class="pygments highlight"><code data-lang="text"><span></span>git clone https://github.com/funcool/cats</code></pre> </div> </div> </div> @@ -2048,7 +2048,7 @@ <h3 id="run-tests"><a class="link" href="#run-tests">Run tests</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">lein test</code></pre> +<pre class="pygments highlight"><code data-lang="text"><span></span>lein test</code></pre> </div> </div> <div class="paragraph"> @@ -2056,7 +2056,7 @@ <h3 id="run-tests"><a class="link" href="#run-tests">Run tests</a></h3> </div> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">./scripts/build +<pre class="pygments highlight"><code data-lang="text"><span></span>./scripts/build node ./out/tests.js</code></pre> </div> </div> @@ -2065,7 +2065,7 @@ <h3 id="run-tests"><a class="link" href="#run-tests">Run tests</a></h3> <h3 id="license"><a class="link" href="#license">License</a></h3> <div class="listingblock"> <div class="content"> -<pre class="pygments highlight"><code data-lang="text">Copyright (c) 2014-2016 Andrey Antukh <niwi@niwi.nz> +<pre class="pygments highlight"><code data-lang="text"><span></span>Copyright (c) 2014-2016 Andrey Antukh <niwi@niwi.nz> Copyright (c) 2014-2016 Alejandro Gómez <alejandro@dialelo.com> All rights reserved. @@ -2098,7 +2098,7 @@ <h3 id="license"><a class="link" href="#license">License</a></h3> </div> <div id="footer"> <div id="footer-text"> -Last updated 2017-04-20 15:34:45 CEST +Last updated 2018-01-11 09:53:43 CET </div> </div> </body>